# bash_profile export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$ " export CLICOLOR=1 export LSCOLORS=ExFxBxDxCxegedabagacad source ~/.bashrc set -o vi if [ -f ~/.git-completion.bash ]; then . ~/.git-completion.bash fi export LC_ALL=en_US.UTF-8 export LANG=en_US.UTF-8 # bashrc alias cls='printf "\33c\e[3J"' export HISTCONTROL=ignoreboth:erasedups shopt -s histappend export HISTSIZE=10000 PROMPT_COMMAND="history -a ;history -c; history -n; history -r; $PROMPT_COMMAND" alias ipython='ipython --TerminalInteractiveShell.editing_mode=vi' function extract() # Handy Extract Program { if [ -f $1 ] ; then case $1 in *.tar.bz2) tar xvjf $1 ;; *.tar.gz) tar xvzf $1 ;; *.bz2) bunzip2 $1 ;; *.rar) unrar x $1 ;; *.gz) gunzip $1 ;; *.tar) tar xvf $1 ;; *.tbz2) tar xvjf $1 ;; *.tgz) tar xvzf $1 ;; *.zip) unzip $1 ;; *.Z) uncompress $1 ;; *.7z) 7z x $1 ;; *) echo "'$1' cannot be extracted via >extract<" ;; esac else echo "'$1' is not a valid file!" fi } # Creates an archive (*.tar.gz) from given directory. function maketar() { tar cvzf "${1%%/}.tar.gz" "${1%%/}/"; } # Create a ZIP archive of a file or folder. function makezip() { zip -r "${1%%/}.zip" "$1" ; } # Make your directories and files access rights sane. function sanitize() { chmod -R u=rwX,g=rX,o= "$@" ;} function my_ip() # Get IP adress on ethernet. { MY_IP=$(/sbin/ifconfig eth0 | awk '/inet/ { print $2 } ' | sed -e s/addr://) echo ${MY_IP:-"Not connected"} }