Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 168 lines (128 sloc) 4.72 KB
PATH="~/Dropbox/bin:${PATH}"
# Allow for the git branch to be put in the comand promt
source ~/Dropbox/env-config/gitprompt
export GIT_PS1_SHOWDIRTYSTATE=true
source /usr/local/etc/bash_completion.d/git-prompt.sh
# Allow branch autocompletion
source /usr/local/etc/bash_completion.d/git-completion.bash
export PS1="\n\u@loc:\W ► "
[[ -s "/Users/lillq/.rvm/scripts/rvm" ]] && source "/Users/lillq/.rvm/scripts/rvm" # This loads RVM into a shell session.
export PATH=$HOME/local/node/bin:$PATH
cd ~/Dropbox/work/apps
export EDITOR='mvim -fv'
export VISUAL='mvim -fv'
##
# Your previous /Users/lillq/.bash_profile file was backed up as /Users/lillq/.bash_profile.macports-saved_2009-09-19_at_07:04:34
##
alias regentags="bundle show --paths | xargs ctags -R;ctags -R -a *"
alias ..="cd .."
alias ...="cd .. ; cd .."
alias ls="ls -G" # list
alias la="ls -Ga" # list all, includes dot files
alias ll="ls -Gl" # long list, excludes dot files
alias lla="ls -Gla" # long list all, includes dot files
alias stfu="osascript -e 'set volume output muted true'"
alias pumpitup="sudo osascript -e 'set volume 10'"
alias refresh="source ~/.bash_profile"
# Get readable list of network IPs
alias ips="ifconfig -a | perl -nle'/(\d+\.\d+\.\d+\.\d+)/ && print $1'"
alias myip="dig +short myip.opendns.com @resolver1.opendns.com"
alias flush="dscacheutil -flushcache" # Flush DNS cache
alias gzip="gzip -9n" # set strongest compression level as ‘default’ for gzip
alias ping="ping -c 5" # ping 5 times ‘by default’
alias ql="qlmanage -p 2>/dev/null" # preview a file using QuickLook
alias hawking="ssh hawking.inigral.com"
alias einstein="ssh einstein.inigral.com"
alias shulgin="ssh shulgin.inigral.com"
alias 0="cd ~/Dropbox/work/apps"
alias 1="cd ~/Dropbox/work/apps/schools1"
alias 2="cd ~/Dropbox/work/apps/schools2"
alias termkit="cd ~/Dropbox/source/TermKit/Node; node nodekit.js"
alias pstop="passenger stop"
alias s="history | grep"
alias rmswap="find /Users/lillq/Dropbox/work/apps -type f -ipath \"*\.sw?\" -exec rm {} \;"
alias gd="git difftool"
alias gc="git commit"
alias gco="git checkout"
alias pull="git pull"
alias push="git push"
alias gs="git status"
alias ga="git add"
alias gaa="git add --all"
alias gitprune="git remote prune origin"
alias gitclean="git branch --merged | grep -v '\*' | xargs -n 1 git branch -d"
alias vim='mvim -v'
alias dl='tail -f log/debug.log'
# server short cuts
alias curie='ssh curie.inigral.com'
alias hofmann='ssh hofmann.inigral.com'
alias hubble='ssh hubble.inigral.com'
alias newton='ssh newton.inigral.com'
alias einstein='ssh einstein.inigral.com'
alias lovelace='ssh lovelace.inigral.com'
alias dawkins='ssh dawkins.inigral.com'
alias babbage='ssh babbage.inigral.com'
alias pspec='rake parallel:spec; cat log/parallel_summary.log'
alias fpspec='rake parallel:setup; rake parallel:spec; cat log/parallel_summary.log'
export PATH=/usr/local/bin:$PATH
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace
# append to the history file, don't overwrite it
shopt -s histappend
# Append to history file for each new command
export PROMPT_COMMAND='history -a'
# Save each command right after it has been executed, not at the end of the session.
PROMPT_COMMAND='history -a'
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTFILESIZE=100000
HISTSIZE=100000
# Ruby preformance settings
export RUBY_HEAP_MIN_SLOTS=1000000
export RUBY_HEAP_SLOTS_INCREMENT=1000000
export RUBY_HEAP_SLOTS_GROWTH_FACTOR=1
export RUBY_GC_MALLOC_LIMIT=100000000
export RUBY_HEAP_FREE_MIN=500000
# Define Vim wrappers which unsets GEM_HOME and GEM_PATH before
# invoking vim and all known aliases
#
# @author Wael Nasreddine <wael.nasreddine@gmail.com>
function define_vim_wrappers()
{
vim_commands=(
eview evim gview gvim gvimdiff gvimtutor rgview
rgvim rview rvim vim vimdiff vimtutor xxd mvim
)
for cmd in ${vim_commands[@]}; do
cmd_path=`/usr/bin/env which -a "${cmd}" 2> /dev/null | grep '^/'`
if [ -x "${cmd_path}" ]; then
eval "function ${cmd} () { (unset GEM_HOME; unset GEM_PATH; $cmd_path \$@) }"
fi
done
}
function card() { open -a Google\ Chrome 'https://mingle.inigral.com/projects/schools/cards/'"$1"; }
function tabname {
printf "\e]1;$1\a"
}
function winname {
printf "\e]2;$1\a"
}
clear
echo ""; echo "";
directory_change_callback 2> /dev/null
function cd {
pushd $1 > /dev/null
directory_change_callback 2> /dev/null
}
function ssh {
/usr/bin/ssh $1
directory_change_callback 2> /dev/null
}
function fstart {
tabname "foreman"
foreman start; passenger stop; directory_change_callback 2> /dev/null
}
function rc {
tabname "rails console"
rails c && directory_change_callback 2> /dev/null
}