Skip to content

Instantly share code, notes, and snippets.

View afaur's full-sized avatar

Adam Faur afaur

View GitHub Profile
@afaur
afaur / filter_vim.js
Created December 1, 2016 08:30
Filter vim using `!` for example `!!node filter_vim.js` will remove the vowels of the current line.
process.stdin.setEncoding('utf8')
var chunks = []
process.stdin.on('readable', function () {
var chunk = process.stdin.read()
chunks.push(chunk)
})
process.stdin.on('end', function () {
var input = chunks.join('')
@afaur
afaur / PHP_Form_Field_Mapping_Replacement.php
Created November 21, 2016 20:08
PHP Form Field Mapping Replacement
<?php
$search_by_keys = array(
'foo',
'bar',
'baz'
);
$replace_with_keys = array(
'meow',
@afaur
afaur / Talk Notes.txt
Last active November 23, 2018 14:28
Interactive Walkthrough Notes - Iterm2, Tmux, Zsh, Vim, Dotties, Visual Studio Code, and Other CLI Tools
Visual Studio Code
- Terminal Integration
- Big benefit as your able to create multiple sessions and supports color.
- Plugins
Visual Studio Code Settings Sync
- Sync Settings, Snippets, launch, keybindings files and extensions Across Multiple Machines using Github GIST.
File Peek
@afaur
afaur / private.xml
Last active August 23, 2016 13:59
Karabiner Settings for Mac OSX ctrl + hjkl enabled movement.
<?xml version="1.0"?>
<root>
<appdef>
<appname>FINDER_OR_SYSPREF</appname>
<equal>com.apple.finder</equal>
<equal>com.apple.systempreferences</equal>
<equal>com.apple.Preview</equal>
</appdef>
<item>
<name>HJKL Mode</name>
<!DOCTYPE HTML>
<html>
<head>
<title>CSS SPA</title>
<style>
#content > #blog:not(:target) + #contact:not(:target) + #home,
#content > div:target {
display: block;
}
#content div:not(:target) {
@afaur
afaur / apple_2_keyboard_maps.txt
Created May 24, 2016 15:23
Apple Keyboard 2 Key Maps
For smaller form factor keyboard.
To retain the forward delete (117)
I map my right hand side alt/opt key to be forward delete.
To have more convient control key access I swap caps with control.
@afaur
afaur / resize_terminal_with_command.sh
Created May 23, 2016 13:59
Resize a terminal window using a command. Helpful when you like to keep fullscreen terminal after adding a new tab or adjusting font size (cmd -/+).
// Make sure top left corner is positioned before running
// What the command means:
// `\e[8; Height;Width t`
printf '\e[8;55;213t'

Keybase proof

I hereby claim:

  • I am afaur on github.
  • I am afaur (https://keybase.io/afaur) on keybase.
  • I have a public key ASAAVllue4XWA1NQvnqNVV5Ex5_X6vBqWTHsUGHl-Y6_Ogo

To claim this, I am signing this object: