Skip to content

Instantly share code, notes, and snippets.

@dnch
Created October 24, 2012 06:30
Show Gist options
  • Save dnch/3944389 to your computer and use it in GitHub Desktop.
Save dnch/3944389 to your computer and use it in GitHub Desktop.
.zshrc
# Path to your oh-my-zsh configuration.
export ZSH=$HOME/.oh-my-zsh
# Set to the name theme to load.
# Look in ~/.oh-my-zsh/themes/
export ZSH_THEME="codeape"
# Set to this to use case-sensitive completion
# export CASE_SENSITIVE="true"
# Comment this out to disable weekly auto-update checks
# export DISABLE_AUTO_UPDATE="true"
# Uncomment following line if you want to disable colors in ls
export DISABLE_LS_COLORS="true"
plugins=(gem rails rails3 git textmate ruby osx brew cap bundler github osx rbenv)
source $ZSH/oh-my-zsh.sh
# Customize to your needs...
export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin
export TERM='xterm-256color'
# Configure Postgres.app
export PATH="/Applications/Postgres.app/Contents/MacOS/bin:$PATH"
export PGHOST='localhost'
export PGUSER='rails'
alias ll='ls -hl'
alias la='ls -a'
alias lla='ls -lah'
# Railsisms
alias rr="if [ -d ./tmp ]; then touch ./tmp/restart.txt; fi"
alias devlog="if [ -f ./log/development.log ]; then tail -f log/development.log; fi"
alias berg="be rails g"
alias start_redis="redis-server /usr/local/etc/redis.conf"
alias stop_redis="redis-cli SHUTDOWN"
export MEMCACHE_PID="/usr/local/var/run/memcached.pid"
alias start_memcache="memcached -d -m 8 -l 127.0.0.1 -P $MEMCACHE_PID"
function stop_memcache() {
if [[ -f $MEMCACHE_PID ]]; then
kill `cat $MEMCACHE_PID`
else
echo "memcached does not appear to be running; pid file not found."
fi
}
alias annotate="if [ -d ./app/models ]; then annotate --position before --exclude tests fixtures; fi"
function grr {
if [[ -f ./Gemfile ]]; then
bundle exec rake routes | awk '{ print $1; }' | grep $1
else
rake routes | awk '{ print $1; }' | grep $1
fi
}
# and finally, RVM
if [[ -s /Users/dan/.rvm/scripts/rvm ]] ; then source /Users/dan/.rvm/scripts/rvm ; fi
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment