This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################################ | |
# 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.: | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vboxmanage list runningvms | cut -d \" -f 2 | xargs -I % vboxmanage controlvm % poweroff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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" ;} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias random='curl --silent "https://www.random.org/passwords/?num=1&len=10&format=plain&rnd=new"' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Sniff browser request headers in a quick crude way | |
# | |
# deps: | |
# brew install ngrep | |
# brew install libpcap | |
# | |
sudo ngrep -q -W byline "^(GET|POST) .*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo tcpdump -s 0 -A 'tcp[((tcp[12:1] & 0xf0) >> 2):4] = 0x47455420' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:document.getElementsByClassName("aui-page-panel-inner")[0].style.width='100%'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo rm -rf /** |
OlderNewer