Skip to content

Instantly share code, notes, and snippets.

@marshyski
Last active October 19, 2017 02:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marshyski/0d0a2f2d50ada5c339b8 to your computer and use it in GitHub Desktop.
Save marshyski/0d0a2f2d50ada5c339b8 to your computer and use it in GitHub Desktop.
My BASH profile
#!/bin/bash
GREP_OPTIONS="--color=auto"
GREP_COLOR="1;32"
EDITOR="vim"
VISUAL="vim"
HISTIGNORE="pwd:ls:more:du:history:find:date:top:grep:mount:umount:which:exit:vi:eject:cat:cd:vim"
HISTSIZE="3000"
HISTCONTROL="ignoredups"
NO_PROXY='127.0.0.1, localhost'
JAVA_HOME=$(/usr/libexec/java_home)
PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/local/bin:/opt/local/sbin:$HOME/bin
GOPATH=/Users/timski/goproj
## Color Prompts
CYAN="\[\033[0;36m\]"
GREEN="\[\033[0;32m\]"
RED="\[\033[0;31m\]"
NO_COLOR="\[\033[0m\]"
PS1="$GREEN|$CYAN\u@\h$GREEN|____|$CYAN\d$GREEN|____|$CYAN\t$GREEN|____|$CYANjobs:$RED\j$CYAN/pts:$RED\l$CYAN/$CYAN\W$GREEN/$CYAN \n$CYAN`basename $SHELL`$ $NO_COLOR"
alias ls='ls -G'
alias mkdir='mkdir -pv'
alias curl='curl -sf'
alias proj='cd ~/proj/'
alias scpv="scp -P 2222 vagrant@localhost:"
alias web='RAN=$((RANDOM%100+8000)) && echo $RAN && python3 -m http.server $RAN > /dev/null 2>&1 &'
extract () {
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xvjf $1 ;;
*.tar.gz) tar xvzf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) unrar e $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
}
export PATH PS1 EDITOR VISUAL HISTIGNORE HISTSIZE HISTCONTROL GREP_COLOR GREP_OPTIONS GOPATH NO_PROXY JAVA_HOME
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment