Skip to content

Instantly share code, notes, and snippets.

@derick-montague
Created February 21, 2016 17:03
Show Gist options
  • Save derick-montague/471bc2e51a886832899d to your computer and use it in GitHub Desktop.
Save derick-montague/471bc2e51a886832899d to your computer and use it in GitHub Desktop.
bash profile
# open files with sublime text (e.g. 'subl .')
alias subl='/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl'
export EDITOR='subl -w'
# Kills all processes running on the specified port (e.g. 'killport 8080')
killport() {
lsof -i tcp:$1 | awk '(NR!=1) && ($1!="Google") && ($1!="firefox") {print $2}' | xargs kill
}
# shows pwd in iterm title
if [ $ITERM_SESSION_ID ]; then
export PROMPT_COMMAND='echo -ne "\033];${PWD##*/}\007"; ':"$PROMPT_COMMAND";
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment