Skip to content

Instantly share code, notes, and snippets.

@Akiira
Akiira / skipThroughSkillsoftTraining.js
Created July 12, 2021 19:49
Skip through annoying annual trainings. Will only work for skillsoft
setInterval(function() {
let boring = document.querySelector('video');
let boringAudio = document.querySelector('audio');
if (boring != null) boring.currentTime = boring.duration
if (boringAudio != null) boringAudio.currentTime = boringAudio.duration
setTimeout(function() {
//.navBtn_item .v .navBtn .nextButton
@Akiira
Akiira / rm-unicode-nb-spaces.md
Created July 12, 2021 19:37
This is typically a result of copy and pasting text from Windows -> Mac/Linux and the source encoding & formatting metadata is retained. Use `sed` to strip all violating characters.

Depending on the terminal, execute in one of the following ways:

Direct reference to file:

sed -e $'s/\xC2\xA0/ /g' -e $'s/\xE2\x80\x8b//g' -i /path/to/your/file

Pipe file contents to sed

@Akiira
Akiira / making_language_grammar.md
Created August 8, 2020 02:47 — forked from Aerijo/making_language_grammar.md
Guide to writing an Atom language grammar

A guide to writing a language grammar (TextMate) in Atom

Tree sitter

  • Atom is transitioning to an entirely new way of defining grammars using tree-sitter. This will be enabled by default quite soon now. It is theoretically faster and more powerful than regex based grammars (the one described in this guide), but requires a steeper learning curve. My understanding is that regex based grammars will still be supported however (at least until version 2), so this guide can still be useful. To enable it yourself, go to Settings -> Core and check Use Tree Sitter Parsers

Links for tree-sitter help:

@Akiira
Akiira / .gitconfig
Created May 5, 2020 17:55 — forked from pksunkara/config
Sample of git config file (Example .gitconfig)
[user]
name = Pavan Kumar Sunkara
email = pavan.sss1991@gmail.com
username = pksunkara
[core]
editor = vim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
excludesfile = ~/.gitignore
[sendemail]
smtpencryption = tls
@Akiira
Akiira / .vimrc
Last active October 22, 2021 12:27
[My Fav Vim Plugins] A list of plugins that i think are worth using #vim #me #plugins
:map <F9> :e $MYVIMRC<CR>
# or?
:map <F9> :e $HOME/__vimrc<CR>
# The first one should work on both vim and neovim
@Akiira
Akiira / theme.yml
Created April 16, 2020 21:15
[AsciiDoc Theme, Simple] An example of a simple AsciiDoc theme yml file. https://github.com/capsulecorplab/nasa-sbir-asciidoc #yml #asciidoc #theme
# This yaml file extends default theme. See https://github.com/asciidoctor/asciidoctor-pdf/blob/master/docs/theming-guide.adoc
extends: default
page:
layout: portrait
margin: [1in, 1in, 1in, 1in]
size: Letter
caption:
align: center
table:
caption:
@Akiira
Akiira / grok_vi.mdown
Last active November 7, 2021 15:42 — forked from nifl/grok_vi.mdown
Your problem with Vim is that you don't grok vi.

Answer by Jim Dennis on Stack Overflow question stackoverflow

Your problem with Vim is that you don't grok vi.

You mention cutting with yy and complain that you almost never want to cut whole lines. In fact programmers, editing source code, very often want to work on whole lines, ranges of lines and blocks of code. However, yy is only one of many way to yank text into the anonymous copy buffer (or "register" as it's called in vi).

The "Zen" of vi is that you're speaking a language. The initial y is a verb. The statement yy is a simple statement which is, essentially, an abbreviation for 0 y$:

0 go to the beginning of this line. y yank from here (up to where?)

@Akiira
Akiira / PowerShell Customization.md
Created February 15, 2020 03:04 — forked from jchandra74/PowerShell Customization.md
PowerShell, Cmder / ConEmu, Posh-Git, Oh-My-Posh, Powerline Customization

Pimping Up Your PowerShell & Cmder with Posh-Git, Oh-My-Posh, & Powerline Fonts

Backstory (TLDR)

I work as a full-stack developer at work. We are a Windows & Azure shop, so we are using Windows as our development platform, hence this customization.

For my console needs, I am using Cmder which is based on ConEmu with PowerShell as my shell of choice.

Yes, yes, I know nowadays you can use the Linux subsystem on Windows 10 which allow you to run Ubuntu on Windows. If you are looking for customization of the Ubuntu bash shell, check out this article by Scott Hanselman.