Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 115 lines (89 sloc) 2.3 KB
export CMS_DEV_ROOT="/Users/mattdean/cms/trabian_cms"
export CMS_GEM_DEV_ROOT="/Users/mattdean/cms/gems"
export EDITOR='mate -w'
# cd
alias ..="cd .."
alias cdd="cd -"
alias -g ...='../..'
alias -g ....='../../..'
alias -g .....='../../../..'
# Finder
alias o="open . &"
alias ff="open -a Firefox"
# Gems
alias gi="sudo gem install"
alias giv="sudo gem install -v"
# Git
alias g="git status"
alias gb="git branch"
alias gp="git push"
alias gl="git pull"
alias gadd="git add -u && git add . && git status"
alias gci="git pull --rebase && rake && git push"
alias gc="git commit"
alias gca="git commit -a"
alias gco="git checkout"
alias gcb="git checkout -b"
alias gm="git merge"
alias gconf="$EDITOR .git/config"
function gg() {
git commit -v -a -m "$*"
}
function gbt() {
git branch --track $2 $1/$2
git checkout $2
}
function grf() {
rm $1
git checkout $1
}
# ls
alias l="ls -laGh"
# Rails
alias migrate="rake db:migrate db:test:prepare"
alias remigrate="rake db:migrate && rake db:migrate:redo && rake db:schema:dump db:test:prepare"
alias cuc="cucumber -r features"
alias sg="./script/generate"
alias sp="./script/plugin install"
alias r="rake"
alias rr="touch tmp/restart.txt"
# Top
alias tu="top -o cpu" # cpu
# alias tm="top -o vsize" # memory
# Alias
alias reload="source ~/.aliases"
alias ea="mate -w ~/.aliases && reload"
alias m="mate ."
# VIM
alias e="mvim"
# CD to a directory and open MVIM
function cdmvim() {
cd $1
mvim .
}
# CMS
function cmsinit() {
export CMS_DB_USER='root'
export CMS_DB_PASSWORD=''
env ARCHFLAGS="-arch x86_64" rails -m http://github.com/trabian/rails-templates/raw/master/cms.rb $1
}
# CMS (Local)
function cmsinit_local() {
export CMS_DB_USER='root'
export CMS_DB_PASSWORD=''
env ARCHFLAGS="-arch x86_64" rails -m ~/cms/rails-templates/cms.rb $1
}
function bundle() {
env ARCHFLAGS="-arch x86_64" /usr/bin/bundle $*
}
###########
# Tunnels #
###########
alias hfcut='ssh -l root -L 7800:209.184.80.21:22 70.85.82.36 -N &'
alias hfcu='ssh -p 7800 hfcu'
if [[ -s /Users/mattdean/.rvm/scripts/rvm ]] ; then source /Users/mattdean/.rvm/scripts/rvm ; fi
alias blkt='ssh blktun -N &'
export GEM_EDITOR='mate'
export PATH=/usr/local/share/npm/bin:$PATH
source ~/.ec2/keys.txt
if [[ -s /Users/mattdean/.rvm/scripts/rvm ]] ; then source /Users/mattdean/.rvm/scripts/rvm ; fi