Skip to content

Instantly share code, notes, and snippets.

@adanselm
Created December 9, 2014 12:16
Show Gist options
  • Save adanselm/f8eb0f224c7bf090fa0f to your computer and use it in GitHub Desktop.
Save adanselm/f8eb0f224c7bf090fa0f to your computer and use it in GitHub Desktop.
My aliases for Zsh : killall lookalike, rebuilding osx "open with" db, checking new files in mercurial changeset, etc.
# Check if Incoming pull has new files in its changeset
alias hgnf="hg in -p | grep -B1 'new file'"
# start postgres
alias pgstart="/usr/local/bin/pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start"
# Cleanup the "open with" list of OSX by rebuilding its db
alias rebuild-openwith="/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user"
# Kill all processes containing the given string
function killa()
{
ps aux | grep $1 | grep -v "grep" | cut -d' ' -f11 | xargs kill
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment