Skip to content

Instantly share code, notes, and snippets.

@dubilla
Created November 13, 2013 20:24
Show Gist options
  • Save dubilla/7455749 to your computer and use it in GitHub Desktop.
Save dubilla/7455749 to your computer and use it in GitHub Desktop.
CK's Bash profile
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
[[ -s "$HOME/.nvm/nvm.sh" ]] && . /Users/chris/.nvm/nvm.sh # This loads NVM
PATH=$PATH:/usr/local/sbin
### Don't put duplicate lines or lines starting with space in the history. ###
HISTCONTROL=ignoreboth
### LS colors. ###
export CLICOLOR=1
export LSCOLORS=gxBxhxDxfxhxhxhxhxcxcx
### Git tab completion script. ###
# curl https://github.com/git/git/raw/master/contrib/completion/git-completion.bash -OL
source ~/git-completion.bash
### Hub ###
alias git=hub
# hub tab-completion script for bash.
# This script complements the completion script that ships with git.
# Check that git tab completion is available
if declare -F _git > /dev/null; then
# Duplicate and rename the 'list_all_commands' function
eval "$(declare -f __git_list_all_commands | \
sed 's/__git_list_all_commands/__git_list_all_commands_without_hub/')"
# Wrap the 'list_all_commands' function with extra hub commands
__git_list_all_commands() {
cat <<-EOF
alias
pull-request
fork
create
browse
compare
EOF
__git_list_all_commands_without_hub
}
# Ensure cached commands are cleared
__git_all_commands=""
fi
### Display current Git branch name in command prompt. ###
function parse_git_branch () {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
RED="\[\033[0;31m\]"
YELLOW="\[\033[0;33m\]"
GREEN="\[\033[0;32m\]"
NO_COLOR="\[\033[0m\]"
# PS1="$GREEN\u@\h$NO_COLOR:\w$YELLOW\$(parse_git_branch)$NO_COLOR\$ "
PS1="$GREEN\u$NO_COLOR \W$YELLOW\$(parse_git_branch)$NO_COLOR: "
### Alias definitions. ###
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
# Bundle Exec Fatigue - http://opensoul.org/blog/archives/2011/09/14/bundle-exec-fatigue/
alias bx="bundle exec"
alias bi="bundle install --binstubs=.bin"
export PATH="./.bin:$PATH"
alias ll='ls -lah'
alias la='ls -AF'
alias l='ls -CF'
alias gs='git status'
alias gd='git diff'
alias migrate='bundle exec rake db:migrate; bundle exec rake db:migrate RAILS_ENV=test'
alias rakeballs='bi && migrate'
alias tdd="tddium run --no-ci"
alias ah="airhorn"
alias msg="terminal-notifier -remove ALL -title Terminal -message "
alias del="trash"
alias textedit="open -a 'TextEdit'"
alias re-source="source ~/.bash_profile"
alias simpleserver="python -m SimpleHTTPServer"
# http://fredwu.me/post/60441991350/protip-ruby-devs-please-tweak-your-gc-settings-for
export RUBY_GC_MALLOC_LIMIT=90000000
export RUBY_FREE_MIN=200000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment