Skip to content

Instantly share code, notes, and snippets.

@QinMing
Last active July 19, 2016 07:19
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 QinMing/0133f79f961dccee7e70 to your computer and use it in GitHub Desktop.
Save QinMing/0133f79f961dccee7e70 to your computer and use it in GitHub Desktop.
.bash_profile or .profile
# Ming's .bash_profile
# -- Less is better
# function cd() {
# if [ $# -gt 0 ]; then
# builtin cd "$*" && ls
# else
# builtin cd && ls
# fi
# }
alias grep='grep --color=auto'
alias g='git'
function parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
# changethe color of terminal https://wiki.archlinux.org/index.php/Color_Bash_Prompt. User: \u
# export COLOR_NC='\e[0m' # No Color
# export COLOR_WHITE='\e[1;37m'
# export COLOR_BLACK='\e[0;30m'
# export COLOR_BLUE='\e[0;34m'
# export COLOR_LIGHT_BLUE='\e[1;34m'
# export COLOR_GREEN='\e[0;32m'
# export COLOR_LIGHT_GREEN='\e[1;32m'
# export COLOR_CYAN='\e[0;36m'
# export COLOR_LIGHT_CYAN='\e[1;36m'
# export COLOR_RED='\e[0;31m'
# export COLOR_LIGHT_RED='\e[1;31m'
# export COLOR_PURPLE='\e[0;35m'
# export COLOR_LIGHT_PURPLE='\e[1;35m'
# export COLOR_BROWN='\e[0;33m'
# export COLOR_YELLOW='\e[1;33m'
# export COLOR_LIGHT_YELLOW='\e[0;33m'
# export COLOR_GRAY='\e[1;30m'
# export COLOR_LIGHT_GRAY='\e[0;37m'
# export PS1="\[${COLOR_LIGHT_YELLOW}\]\A\[${COLOR_NC}\] \[${COLOR_LIGHT_GRAY}\]\w\[${COLOR_NC}\]\[${COLOR_LIGHT_CYAN}\]\\[${COLOR_NC}\] "
#export PS1='\[\e[35m\]\u@\h \[\e[0m\]\w\[\e[1;37m\]$(parse_git_branch)\n[\#] $ \[\[\e[0m\]'
#PS1='\[\e[33m\]\T\[\[\e[0m\] \[\e[0;37m\]\w$(parse_git_branch)$ \[\[\e[0m\]'
export PS1='\[\e[33m\]\T\[\[\e[0m\] \w$(parse_git_branch)$ '
#Notice: I found that if use "" instead of '', then parse_git_branch will not refresh automatically.
# # Light
#export CLICOLOR=1
#export LSCOLORS=AxFxCxDxBxegedabagaced
# # Dark
export CLICOLOR=1
export LSCOLORS=fxfxcxdxbxegedabagaced
# Golang
# export GOPATH=$HOME/gopath
# export PATH=$PATH:$GOPATH/bin
# git config --global credential.helper 'cache --timeout=999999'
HISTFILESIZE=2048
# Setting PATH for Python 3.4
PATH="/Library/Frameworks/Python.framework/Versions/3.4/bin:${PATH}"
export PATH
# added by Anaconda 2.2.0 installer
export PATH="/Users/qinming/anaconda/bin:$PATH"
# Golang
export GOPATH=$HOME/gopath
export PATH=$PATH:$GOPATH/bin
# alias vim="/Applications/MacVim.app/Contents/MacOS/MacVim"
# git config --global credential.helper 'cache --timeout=999999'
# Loading Simple Virtualenv Wrapper https://github.com/QinMing/simple-virtualenv-wrapper
source $HOME/git/simple-virtualenv-wrapper/ve.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment