Skip to content

Instantly share code, notes, and snippets.

@magoon
magoon / gist:6004849
Created July 16, 2013 00:43
Random password alias for your command-line
alias random='curl --silent "https://www.random.org/passwords/?num=1&len=10&format=plain&rnd=new"'
@magoon
magoon / gist:6002482
Created July 15, 2013 19:00
Command-like Wikipedia
# Wikipedia lookup from command line
#
# Add this function to your ~/.bash_profile
#
# Usage: wiki %s
# Example: wiki antidisestablishmentarianism
#
function wiki() { dig +short txt "$@.wp.dg.cx" ;}
@magoon
magoon / vagrantshalt
Last active December 19, 2015 18:58
Halt all running vagrants (or virtualboxes)
vboxmanage list runningvms | cut -d \" -f 2 | xargs -I % vboxmanage controlvm % poweroff
@magoon
magoon / .bash_ps1
Last active December 19, 2015 18:58
Colored git prompt (current branch, status, and stash count)
################################################
# Git prompt
#
# 2013-06-25 amagoon@northps.com: added statuses
#
# save this as ~/.bash_ps1
#
# point to this file in your ~/.bash_profile
# e.g.:
#