Skip to content

Instantly share code, notes, and snippets.

@joao
Created December 19, 2015 23:09
Show Gist options
  • Save joao/baf9a9686a2b0b3dfab7 to your computer and use it in GitHub Desktop.
Save joao/baf9a9686a2b0b3dfab7 to your computer and use it in GitHub Desktop.
alias
alias p="ps aux | grep $1"
alias whatsmyip="curl icanhazip.com"
alias sizeit="du -sh $1"
alias countfiles="find . -type f | wc -l"
alias brewupgrade="brew upgrade && brew prune && brew cleanup"
# open current directory files in Sublime Text
alias s="subl ."
# MAC related
# To flush DNS cache, in OS X 10.10
alias resetdnscache="sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder; echo 'DNS cache flushed!'"
# To fix duplicates in Finders' "Open With"
alias fixopenwith='/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user && killall Finder'
alias digdns="dig +nocmd $1 any +multiline +noall +answer"
alias checkdns="dig -t ANY $1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment