Skip to content

Instantly share code, notes, and snippets.

@steve-thousand
Forked from natelandau/.bash_profile
Last active February 26, 2019 13:40
Show Gist options
  • Save steve-thousand/23913a2fe17f5a679505b38503e0e44f to your computer and use it in GitHub Desktop.
Save steve-thousand/23913a2fe17f5a679505b38503e0e44f to your computer and use it in GitHub Desktop.
Mac OSX Bash Profile
# OVERRIDES
cd() { builtin cd "$@"; ll; }
# ALIASES
alias cd..='cd ../' # Go back 1 directory level (for fast typers)
alias ..='cd ../' # Go back 1 directory level
alias ...='cd ../../' # Go back 2 directory levels
alias .3='cd ../../../' # Go back 3 directory levels
alias .4='cd ../../../../' # Go back 4 directory levels
alias .5='cd ../../../../../' # Go back 5 directory levels
alias .6='cd ../../../../../../' # Go back 6 directory levels
alias ~="cd ~" # ~: Go Home
alias code_profile='code ~/.bash_profile'
alias edit_profile='vim ~/.bash_profile'
alias reload_profile='source ~/.bash_profile'
alias pgconfig='code ~/.pg_service.conf ~/.pgpass'
alias sshconfig='code ~/.ssh/config'
alias restart_powerline='powerline-daemon --replace'
# FUNCTIONS
function free_port () {
echo "killing anything listening to port $1"
lsof -ti:$1 -sTCP:LISTEN | xargs kill
}
pg() {
PGSERVICE=$1 psql
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment