Skip to content

Instantly share code, notes, and snippets.

@alfredormz
Created April 5, 2012 14:57
Show Gist options
  • Save alfredormz/2311756 to your computer and use it in GitHub Desktop.
Save alfredormz/2311756 to your computer and use it in GitHub Desktop.
.bashrc
export PS1='\[\033[01;32m\]\W \[\033[00;37m\]$(echo $(branch) \$\[\033[00m\]'
HISTCONTROL=ignoredups:ignorespace
HISTSIZE=1000
HISTFILESIZE=2000
shopt -s histappend
alias ls='ls -lF'
alias la='ls -A'
alias l='ls -CF'
alias less='less -R'
alias rebash='. ~/.bashrc'
alias vimbash='vim ~/.bashrc'
alias du='du -h'
alias df='df -h'
alias free='free -m'
alias irb='irb --simple-prompt --readline'
alias alert='notify-send --urgency=critical -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
alias pgisifar='psql -U isifar isifar_development'
alias gst="git status -sb"
alias gci="git commit"
alias gco="git checkout"
alias gdf="git diff"
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
export EDITOR=vim
export PATH=/usr/local/pgsql/bin:$PATH
export PATH=/opt/mongodb/bin:$PATH
export PATH=/opt/java/bin:$PATH
export PATH=/opt/eclipse:$PATH
export PATH=/opt/ant/bin:$PATH
ips(){
ifconfig | grep 'inet ' | cut -d':' -f2 | cut -d' ' -f1 | tail -n 1
inet=$(curl http://icanhazip.com/ 2> /dev/null)
if [ ! -z $inet ]
then
echo $inet
fi
}
branch(){
test -d .git && git symbolic-ref HEAD 2> /dev/null | cut -d/ -f3
}
push() {
git push origin $(branch)
}
pull() {
git pull origin $(branch)
}
[[ -s $HOME/.rvm/scripts/rvm ]] && source $HOME/.rvm/scripts/rvm
rvm default
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment