Last active
December 20, 2015 11:29
-
-
Save b-murphy/6124091 to your computer and use it in GitHub Desktop.
This file contains 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
export PATH="/Users/brendanmurphy/bin:$PATH:." | |
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" | |
export PATH="/usr/local/bin:$PATH:/usr/local/bin" | |
export PATH="/usr/local/heroku/bin:$PATH" | |
# Enthuse | |
alias enthuse="cd ~/work/Enthuse" | |
alias be="bundle exec" | |
alias rdb="bundle install; bundle exec rake db:drop; bundle exec rake db:create; bundle exec rake db:migrate; bundle exec rake db:test:prepare" | |
alias rdbi="bundle install; bundle exec rake db:drop; bundle exec rake db:create; import_backup; rake db:migrate; be rake db:test:prepare" | |
# rails | |
alias rs="rails s" | |
#Git | |
alias g="git" | |
alias gb="git branch --color" | |
alias gc="git checkout" | |
alias gcon="git rebase --continue" | |
alias gr="git rebase" | |
alias gri="git rebase -i" | |
alias gdn="git diff --name-only" | |
alias gh="git for-each-ref --count=30 --sort=-committerdate refs/heads/ --format='%(refname:short)'" | |
alias udev="git fetch; git merge origin/dev" | |
alias gl="git log --all --graph --color --oneline" | |
# Rspec | |
alias r="bundle exec rspec" | |
# Cucumber | |
alias c="bundle exec cucumber" | |
function pair_server () { | |
local x=$1 | |
cat ~/.ssh/id_rsa.pub | ssh root@$1 'mkdir ~/.ssh; cat - >> ~/.ssh/authorized_keys; chmod 600 ~/.ssh/authorized_keys && chmod 700 ~/.ssh/ ' | |
} | |
# kill a function | |
function close () { | |
local x=$1 | |
ps -ef | grep $x | grep -v grep | awk '{print $2}' | xargs kill -9 | |
} | |
###### To display the current branch in the console :-) | |
####################################################################################### | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ \[\1\]/' | |
} | |
function publish { | |
git push origin "{parse_git_branch}" | |
} | |
function proml { | |
local BLUE="\[\033[0;34m\]" | |
# OPTIONAL - if you want to use any of these other colors: | |
local RED="\[\033[0;31m\]" | |
local LIGHT_RED="\[\033[1;31m\]" | |
local GREEN="\[\033[0;32m\]" | |
local LIGHT_GREEN="\[\033[1;32m\]" | |
local WHITE="\[\033[1;37m\]" | |
local LIGHT_GRAY="\[\033[0;37m\]" | |
# END OPTIONAL | |
local DEFAULT="\[\033[0m\]" | |
PS1="\h:\W $GREEN\$(parse_git_branch) $DEFAULT\$" | |
} | |
proml | |
##########################################################################################export PATH="/opt/chef/embedded/bin:$PATH" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment