Skip to content

Instantly share code, notes, and snippets.


Eric Haughee ehaughee

  • Seattle, WA
View GitHub Profile
jihuichoi / keybindings.json
Created Aug 22, 2019
to navigate backward/forward using mouse button 4,5 on mac
View keybindings.json
// move backward/forward using mouse button 4, 5
{ // remove exsiting bind
"key": "",
"command": "editor.action.indentLines",
"when": "editorTextFocus && !editorReadonly"
{ // remove exsiting bind
"key": "",
sonOfRa /
Last active Mar 5, 2019
Use Sublime Merge as a git mergetool
# A wrapper script to make sublime_merge work more nicely
# when used as a git-mergetool
WORKDIR=`git rev-parse --show-toplevel`
# Replace a leading homedir with ~/ to match the window title
sublime_merge $REAL_WORKDIR
sloanlance /
Last active Feb 26, 2020 — forked from pwnsdx/
Disable Parental Controls and other services in macOS Sierra (OS X)
# This is a draft but it works
# FIRST (I don't even know if it works but we'll assume yes)
# sudo launchctl list
# sudo launchctl disable system/netbiosd
# sudo launchctl disable system/parsecd
# sudo launchctl disable system/parentalcontrols.check
# sudo launchctl disable system/airportd
paulirish /
Last active Aug 11, 2020
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
ImJasonH / markdown.css
Last active Jul 26, 2020
Render Markdown as unrendered Markdown (see
View markdown.css
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
View encouragements.txt
😱 Seriously?
😷 That's a bad look.
Burn it to the ground! 🔥
😠 Torvalds frowns at you.
🚶 Have you considered another career?
You must hate your coworkers. 👹
😡 You must hate yourself.
Ha! Yeah, that'll work. 😄
😕 Are you just hitting keys at random?
You code like a PM. 😐
lelandbatey /
Last active Jul 30, 2020
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!


This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"


# Allows for any file to be extracted using: x $1
x () {
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xjf $1 ;;
*.tar.gz) tar xzf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) rar x $1 ;;
*.gz) gunzip $1 ;;
*.tar) tar xvf $1 ;;
ehaughee /
Last active May 10, 2020
Regular Expression Resources
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:


start new with session name:

tmux new -s myname
You can’t perform that action at this time.