Skip to content

Instantly share code, notes, and snippets.

@ma11hew28
Last active September 4, 2015 20:34
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ma11hew28/380318 to your computer and use it in GitHub Desktop.
Save ma11hew28/380318 to your computer and use it in GitHub Desktop.
.bash_profile file
# Homebrew, Ruby, Bash Completion
# After upgrading Ruby, run: gem pristine --all --only-executables
export PATH="/usr/local/bin:/usr/local/opt/ruby/bin:$PATH"
if [ -f $(brew --prefix)/etc/bash_completion ]; then
. $(brew --prefix)/etc/bash_completion
fi
# Directory Shortcuts
alias prj='cd "$HOME/Projects/"'
# Command Aliases
alias ebp='vim "$HOME/.bash_profile"'
alias sbp='. "$HOME/.bash_profile"'
alias cp='cp -i'
alias mv='mv -i'
alias ln='ln -i'
alias ll='ls -Al'
alias flush='sudo dscacheutil -flushcache'
alias rmdsstores='find . -name .DS_Store -type f -delete'
alias json='pbpaste | python -mjson.tool'
# alias exget='rsync -rlptDvie ssh username@example.com:Projects/example.com/ "$HOME/Projects/example.com/" --delete --exclude ".git*" --exclude .DS_Store'
# alias exdep='rsync -rlptDvie ssh "$HOME/Projects/example.com/" username@example.com:Projects/example.com/ --delete-after --delay-updates --exclude ".git*" --exclude .DS_Store'
# alias expul='rsync -ptgoie ssh username@example.com:Projects/example.com/backup/database.sql ~/Projects/example.com/backup/'
# Current Directory: Show in title bar. Abbreviate in prompt with (git-branch).
PROMPT_COMMAND='CUR_DIR=`pwd|sed -e "s!$HOME!~!"|sed -E "s!([^/])[^/]+/!\1/!g"`'
PS1='\[\e]2;\w\a\e[32;1m\][$CUR_DIR$(__git_ps1)]\$\[\e[0m\] '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment