Skip to content

Instantly share code, notes, and snippets.

@ahx
Created December 29, 2008 17:35
Show Gist options
  • Save ahx/41321 to your computer and use it in GitHub Desktop.
Save ahx/41321 to your computer and use it in GitHub Desktop.
my .profile (aka .bashrc) file
#
# Your previous .profile (if any) is saved as .profile.mpsaved
# Setting the path for MacPorts.
export PATH=/opt/local/bin:/opt/local/sbin:/usr/local/bin:$PATH
# Setting PATH for MacPython 2.5
# The orginal version is saved in .profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/Current/bin:${PATH}"
export PATH
export PATH=/usr/local/graphviz/bin:$PATH
export PATH=~/bin:$PATH
# Git PATH
export PATH=/usr/local/git/bin:$PATH
export MANPATH=/usr/local/git/man:$MANPATH
# Display UTF-8 characters in irb
# export KCODE="u"
#Shoes path
export PATH=/Applications/Shoes.app/Contents/MacOS:$PATH
# JRuby path
JRUBY_HOME=/usr/local/jruby
PATH=$PATH:$JRUBY_HOME/bin
# Ruby 1.9 path
RUBY1_9_HOME=/usr/local/ruby1.9
PATH=$PATH:$RUBY1_9_HOME/bin
#EDITOR vairable
export EDITOR="mate -w"
export GEMDIR=`gem env gemdir`
# geme (aka mategem, vigem..) - open gem source in $EDITOR
geme() {
$EDITOR $GEMDIR/gems/`$(which ls) $GEMDIR/gems | grep -x $1.* | sort | tail -1`/
}
_geme()
{
local curw
COMPREPLY=()
curw=${COMP_WORDS[COMP_CWORD]}
local gems="$(gem environment gemdir)/gems"
COMPREPLY=($(compgen -W '$(ls $gems)' -- $curw));
return 0
}
complete -F _geme -o dirnames geme
# open new Terminal window in same folder
alias t='~/bin/open_new_terminal_window'
alias m='mate'
alias o='open'
alias bash-history='history|awk {a[$2]++ } END{for(i in a){print a[i] " " i}}|sort -rn|head'
# SSH Küerzel
alias ssh_uni='ssh ahaller@...'
# ... private stuff.
# Push and deploy
alias pushit='git push; cap deploy;'
# Rails aliases
alias ss='script/server'
alias ssp='script/server -e production'
alias ts='thin start'
alias tsp='thin start -e production'
alias mr='mongrel_rails start -d'
alias mrs='mongrel_rails stop'
alias sc='script/console'
alias sg='script/generate'
alias sp='script/plugin'
alias sr='script/runner'
alias rt='rake test'
alias rtu='rake test:units'
alias rtr='rake test:recent'
alias db='rake db:migrate'
alias dbt='rake db:test:prepare'
alias dbreset='rake db:reset'
alias dbredo='rake db:migrate:redo'
# Git aliases for bash (from peepcodes git issue)
alias gst='git status'
alias gk='gitk'
# ignore mode changes (T) (windows-mist?)
alias gd='git diff --diff-filter=[ACDMRUXB] | mate'
alias gc='git commit -v'
alias gca='git commit -v -a'
alias gb='git branch'
alias gba='git branch -a'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment