Skip to content

Instantly share code, notes, and snippets.

@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 / .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 / 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 / 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:39c9d2899ea53702b623
Created June 16, 2014 21:38
Simple encrypt/decrypt
#
# Add the following to your .bash_profile
#
# Example: If you run "enc secretfile secretfile.encrypted"
# it'll ask you for a password. Then you, or a friend, can
# reverse it with "dec secretfile.encrypted secretfile"
#
# -andymagoon@gmail.com 2014-06-16
alias enc=encryptfunc
@magoon
magoon / gist:04ad4d37faac9b24ac68
Last active March 17, 2017 20:57
Second hipchat
# To have a second HipChat on Mac OS X
# Run this in your terminal:
cp -a /Applications/HipChat.app/ /Applications/HipChat2.app ; sed -i -e 's/HipChat\</HipChat2</' /Applications/HipChat2.app/Contents/Info.plist ; open /Applications/HipChat2.app ; open /Applications/Utilities/Keychain\ Access.app/
# Sign in, then search for "Hockey" in the KeyChain app that I opened for you. Open each
# found entry, click its Access Control tab, and choose "Allow all applications.." & Save
@magoon
magoon / Patch-ize Bitbucket PR
Created July 28, 2014 23:53
Bookmarklet to turn a Bitbucket pull request into a git patch. Simply create a new bookmark and paste this in as the address, then click it when viewing a Bitbucket PR. This allows you to test anybody's PR on your local environment without merging. To apply a patch, copy the entire patch into your clipboard and, on a Mac, run this from console: …
javascript:(function()%7Bwindow.location.href%3D%22https%3A%2F%2Fbitbucket.org%2Fapi%2F2.0%2Frepositories%2F%22%2BJSON.parse(%24(%22%5Bdata-current-repo%5D%22).attr(%22data-current-repo%22)).fullslug%2B%22%2Fpullrequests%2F%22%2BJSON.parse(%24(%22%5Bdata-current-pr%5D%22).attr(%22data-current-pr%22)).localId%2B%22%2Fpatch%22%3B%7D)();
@magoon
magoon / .bash_profile
Created August 6, 2014 14:14
Open informational website for a particualr brew package
# brewman: think "brew manpage"
#
# usage: brewman [package]
# example: brewman transcrypt
#
# have you ever done a 'brew update' and wondered about all of those fancy new packages?
function brewman() {
brew info $1 | sed -n 2p | xargs open
}
@magoon
magoon / gist:aa555ce2988551ab0a90
Created September 23, 2014 11:26
Remove Adobe Updater from Mac
sudo killall "AAM Updates Notified" ; sudo rm -rf "/Applications/Utilities/Adobe Application Manager/UWA/AAM Updates Notifier.app/"
@magoon
magoon / .bash_profile
Created November 19, 2014 20:58
Fifth element your shell
alias multipass='say -v Cellos corbin dallas multipass multipass multipass Corbin dallas multipass big ba da ba da boom'