Skip to content

Instantly share code, notes, and snippets.

@bcalloway
Created February 17, 2010 16:11
Show Gist options
  • Save bcalloway/306757 to your computer and use it in GitHub Desktop.
Save bcalloway/306757 to your computer and use it in GitHub Desktop.
My custom bash profile
source ~/.git-completion.bash
#Prompt shows user, working directory, and branch if its a git repo
PS1='\h:\w$(__git_ps1 "(%s)") $ '
# maintains a jump-list of the directories you actually use
export JPY=/Users/bcalloway/scripts/j.py # tells j.sh where the python script is
. /Users/bcalloway/scripts/j.sh # provides the j() function
alias jl='j -l'
alias jt='j -t recent'
alias jr='j -t rank'
alias ls='ls -aGlh'
alias flush='dscacheutil -flushcache'
alias web='cd /Users/bcalloway/Sites'
alias start-mysql='sudo /usr/local/mysql/support-files/mysql.server start'
alias stop-mysql='sudo /usr/local/mysql/support-files/mysql.server stop'
# Produce a recursive tree view from the current pwd
alias tree="find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'"
# Recursively remove all .svn directories from the current pwd
alias svnkill="find . -name .svn -print0 | xargs -0 rm -rf"
alias serv='sudo apachectl graceful'
alias rr='touch tmp/restart.txt'
# Git shortcuts
alias rebase='git svn rebase'
alias gci='git commit -a'
alias gup='git svn dcommit'
alias gp='git push'
alias gll='git pull'
alias gl='git log'
alias gs='git status'
alias gpo='git pull origin master'
# For use with Limerick Rake tasks by Thoughtbot
alias gps='rake git:push:staging'
alias gpp='rake git:push:production'
# Rails shortcuts
alias hh='html2haml'
alias cs='css2sass'
alias logtail='tail -f log/development.log'
alias ss='./script/server'
alias sc='./script/console'
alias sd='./script/destroy'
alias sg='./script/generate'
alias sp='./script/plugin'
# Run rails_best_practices gem tasks
alias rbp="rails_best_practices"
# Rcov test coverage
alias rcov2='rcov test/functional/*.rb test/unit/*.rb --output=public/rcov --rails --exclude="gems/*"'
# Quicklook shortcut: ql <name_of_file>
function ql()
{
qlmanage -p "$@" > /dev/null 2>&1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment