Created
December 6, 2012 13:10
-
-
Save jem-computer/4224353 to your computer and use it in GitHub Desktop.
Aliases
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Todo | |
alias todo='$EDITOR ~/.todo' | |
# Unix | |
alias tlf="tail -f" | |
alias ln='ln -v' | |
alias mkdir='mkdir -p' | |
alias ...='../..' | |
alias l='ls' | |
alias ll='ls -al' | |
alias lh='ls -Alh' | |
alias -g G='| grep' | |
alias -g M='| less' | |
alias -g L='| wc -l' | |
alias -g ONE="| awk '{ print \$1}'" | |
alias ports="sudo lsof -iTCP -sTCP:LISTEN -P" | |
# git | |
alias g="git" | |
alias gci="git pull --rebase && rake && git push" | |
# Bundler | |
alias b="bundle" | |
alias be="bundle exec" | |
alias bake="bundle exec rake" | |
# Tests and Specs | |
alias t="ruby -I test" | |
alias s="bundle exec rspec" | |
alias cuc="bundle exec cucumber" | |
# Rubygems | |
alias gi="gem install" | |
alias giv="gem install -v" | |
# Rails | |
alias migrate="bundle exec rake db:migrate db:test:prepare" | |
alias remigrate="bundle exec rake db:migrate db:migrate:redo db:schema:dump db:test:prepare" | |
alias remongrate="bundle exec rake mongoid:migrate mongoid:migrate:redo" | |
# Heroku staging | |
alias staging='heroku run console --remote staging' | |
alias staging-name='echo `basename $PWD`-staging' | |
alias staging-process='watch heroku ps --remote staging' | |
alias staging-releases='heroku releases --remote staging' | |
alias staging-tail='heroku logs --tail --remote staging' | |
# Heroku production | |
alias production='heroku run console --remote production' | |
alias production-name='echo `basename $PWD`-production' | |
alias production-process='watch heroku ps --remote production' | |
alias production-releases='heroku releases --remote production' | |
alias production-tail='heroku logs --tail --remote production' | |
# Heroku databases | |
alias db-pull-staging='heroku db:pull --remote staging --confirm `staging-name`' | |
alias db-pull-production='heroku db:pull --remote production --confirm `production-name`' | |
alias db-copy-production-to-staging='heroku pgbackups:restore DATABASE `heroku pgbackups:url --app production-name` --app `staging-name` --confirm `staging-name`' | |
alias db-backup-production='heroku pgbackups:capture --remote production' | |
# Network | |
alias whats-my-ip="curl -s checkip.dyndns.org | grep -Eo '[0-9\.]+'" | |
alias please="sudo" | |
alias sshcrouwel="ssh REDACTED" | |
alias sshevently="ssh jon@REDACTED" | |
alias mongod="~/mongodb-osx-x86_64-2.0.3/bin/mongod" | |
alias mongo="~/mongodb-osx-x86_64-2.0.3/bin/mongo" | |
alias th='bundle exec thin start -p 4000' | |
alias flushdns='dscacheutil -flushcache' | |
# SSH Auto Completion of Remote Hosts | |
#SSH_COMPLETE=( $(cat ~/.ssh/known_hosts | cut -f 1 -d ' ' | sed -e s/,.*//g | uniq | egrep -v [0123456789]) ) | |
#complete -o default -W "${SSH_COMPLETE[*]}" ssh | |
# Work Mode | |
alias wmstart='sudo workmode start flushdns' | |
alias wmstop='sudo workmode stop flushdns' | |
alias wmlist='sudo workmode list' | |
alias wmadd='sudo workmode add' | |
# Commonplace Wiki | |
alias wiki='cd ~/Dropbox/commonplace; shotgun config.ru' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment