Skip to content

Instantly share code, notes, and snippets.

@travisvalentine
Created August 12, 2012 13:22
Show Gist options
  • Save travisvalentine/3331791 to your computer and use it in GitHub Desktop.
Save travisvalentine/3331791 to your computer and use it in GitHub Desktop.
bash files
export PATH=${PATH}:/usr/local/sbin
export ARCHFLAGS='-arch x86_64' 
# memcached
alias mcd='memcached -d -l 127.0.0.1 -p 11211'
alias mck='killall memcached'
alias mcst='ps ax | grep memcached | grep -v grep'
# RVM
export CC=gcc-4.2
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"
#Git aliases
alias gcl='git clone'
alias gst='git status'
alias gl='git pull'
alias gp='git push'
alias gd='git diff | mate'
alias gc='git commit -v'
alias gcm='git commit -v -m'
alias gca='git commit -v -a'
alias gb='git branch'
alias gba='git branch -a'
alias gco='git checkout'
alias grb='git rebase'
alias gre='git remote'
alias gres='git remote -v show'
alias grea='git remote add'
alias grer='git remote rm'
alias gf='git fetch'
alias ga='git add'
alias gaa='git add -A'
alias ganm='git add .' # add new or modified
alias gamr='git add -u' # add modified or removed
alias gs='git stash'
alias gsa='git stash apply'
alias glo='git log'
alias gm='git merge'
alias gk='gitk --all&'
alias gx='gitx --all'
alias ghist='git log --pretty=format:"%h %ad | %s%d [%an]" --graph --date=short'
alias type='cat-file -t'
alias dump='cat-file -p'
# other aliases
alias cane="cane --style-glob '**/*.rb' --abc-glob '**/*.rb'"
alias cane-s="cane --style-glob '{app,lib}/**/*.rb' --abc-glob '{app,lib}/**/*.rb'"
alias rspec='rspec --colour --format d'
alias reload='source ~/.bash_profile'
RED="\[\033[0;31m\]"
YELLOW="\[\033[0;33m\]"
GREEN="\[\033[0;32m\]"
BLUE="\[\033[0;36m\]"
PINK="\[\033[0;35m\]"
WHITE="\[\033[1;37m\]"
BLACK="\[\033[0;30m\]"
OFF="\[\033[0m\]"
# Download git-completion from https://github.com/rtomayko/dotfiles/blob/rtomayko/.bash_completion.d/git-completion.bash
source /usr/local/etc/bash_completion.d/git-completion.bash
export PS1="$YELLOW\$(~/.rvm/bin/rvm-prompt v) $BLUE\W $PINK\$(__git_ps1 "[%s]")$OFF \$ "
# other aliases
alias be='bundle exec'
# hitch
hitch() {
command hitch "$@"
if [[ -s "$HOME/.hitch_export_authors" ]] ; then source "$HOME/.hitch_export_authors" ; fi
}
alias unhitch='hitch -u'
# Uncomment to persist pair info between terminal instances
# hitch
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
# Add the following to your ~/.bashrc or ~/.zshrc
hitch() {
command hitch "$@"
if [[ -s "$HOME/.hitch_export_authors" ]] ; then source "$HOME/.hitch_export_authors" ; fi
}
alias unhitch='hitch -u'
# Uncomment to persist pair info between terminal instances
# hitch
export PATH=/usr/local/bin:/usr/local/sbin:~/bin:$PATH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment