Skip to content

Instantly share code, notes, and snippets.

@magoon
magoon / gist:9530212
Created March 13, 2014 15:07
Get Akamai debug info HTTP response headers
alias akamai='curl -s -I -H "Pragma: akamai-x-cache-on, akamai-x-cache-remote-on, akamai-x-check-cacheable, akamai-x-get-cache-key, akamai-x-get-extracted-values, akamai-x-get-nonces, akamai-x-get-ssl-client-session-id, akamai-x-get-true-cache-key, akamai-x-serial-no" '
# Add the line above to your ~/.bash_profile then run source ~/.bash_profile so you can run "akamai http://some/url"
@magoon
magoon / gist:9350928
Created March 4, 2014 17:13
Fun with Mac text-to-speech
say -v Cellos corbin dallas multipass multipass multipass Corbin dallas multipass big ba da ba da boom
@magoon
magoon / .gitconfig
Created November 25, 2013 21:08
Some of my gitconfigs
[color]
# Use all of the colors
diff = auto
status = auto
branch = auto
interactive = auto
ui = true
pager = true
[log]
@magoon
magoon / vagrantfix
Last active December 28, 2015 22:29
Mavericks users run this after rebooting if you want to fix your broken vagrant
sudo /Library/Application\ Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh restart
# Pre-mavericks, try this instead:
# sudo /Library/StartupItems/VirtualBox/VirtualBox restart
@magoon
magoon / snippets
Created November 5, 2013 16:52 — forked from mcallari/snippets
sudo rm -rf /**
@magoon
magoon / widen
Last active December 24, 2015 02:59
Bookmarklet to widen Bitbucket pages
javascript:document.getElementsByClassName("aui-page-panel-inner")[0].style.width='100%';
@magoon
magoon / .gitconfig
Last active December 22, 2015 22:29
p4merge is a free visual diff tool for Mac OS X that can be used as a git mergetool. This allows you to resolve some more complicated merge conflicts. Here is a quick getting started guide.
# Use p4merge as a mergetool for visually resolving Git merge conflicts
# by adding these lines to ~/.gitconfig
[merge]
conflictstyle = diff3
tool = p4merge
[mergetool "p4merge"]
cmd = /Applications/p4merge.app/Contents/Resources/launchp4merge "$PWD/$BASE" "$PWD/$REMOTE" "$PWD/$LOCAL" "$PWD/$MERGED"
trustExitCode = false
[mergetool]
@magoon
magoon / gist:6258317
Created August 17, 2013 19:11
Bash alias to change dir to a subdirectory containing a known file
#
# Usage: cdf style.css
#
# Add to your ~/.bash_profile and then source ~/.bash_profile
#
# If you were in ~/somedir, this could cd ~/somedir/docroot/styles/ if it contained style.css
#
alias cdf=cdfilefunc
@magoon
magoon / sniffheaders
Last active December 20, 2015 09:19
Sniff HTTP headers
sudo tcpdump -s 0 -A 'tcp[((tcp[12:1] & 0xf0) >> 2):4] = 0x47455420'
@magoon
magoon / sniff
Last active December 19, 2015 19:18
Sniff browser request headers
# Sniff browser request headers in a quick crude way
#
# deps:
# brew install ngrep
# brew install libpcap
#
sudo ngrep -q -W byline "^(GET|POST) .*"