Commit bf49b3f0
bf49b3f0a43fMerged
Justin Dorfman <[email protected]> · 10 years ago · 2 files · +1 added · ~1 modified
Description
Added .bash_profile for VPS
Details
- Commit
- bf49b3f0a43f
- Parent
- ff96cddb92b3
conf/.bash_profileaddedView file
1+
export TERM=xterm-256color2+
export LC_ALL=en_US.UTF-83+
export LANG=en_US.UTF-84+
export LANGUAGE=en_US.UTF-85+
export EDITOR=vim6+
7+
### History Handling8+
export HISTCONTROL=erasedups9+
export HISTSIZE=1000010+
shopt -s histappend11+
bind '"\e[A"':history-search-backward12+
bind '"\e[B"':history-search-forward13+
14+
## Web Dev15+
alias sha384="openssl dgst -sha384 -binary | openssl base64"16+
sri384() { hash=`curl -s $1 |sha384`; echo sha384-$hash;}17+
alias icurl="curl -I"18+
alias spy80="tcpdump -X -s 1024 -i en0 port 80"19+
alias canhazip="curl -s canhazip.com"20+
alias jpp="python -m json.tool" #json pretty print21+
alias md5sum='openssl dgst -md5'22+
alias md5='md5sum'23+
24+
## Git25+
alias gs="git status"26+
alias gb="git branch"27+
alias gc="git commit"28+
alias gr="git checkout"29+
alias ga="git add"30+
alias gl="git lola"31+
alias ghr="git reset --hard origin/master"32+
alias grho="git reset --hard origin/master"33+
alias motherfucker="git reset --hard origin/master"34+
alias gp="git pull"35+
alias gitcom="git-commander"36+
37+
## Directories38+
39+
alias ll="ls -alh"40+
alias l="ls -alhtr"41+
alias home="cd ~"42+
alias github="cd ~/github"43+
alias ..="cd .."44+
cd() { builtin cd "$@"; l; }45+
alias f='open -a Finder ./'46+
alias temp="cd /tmp/"47+
48+
### ---------49+
### Functions50+
### ---------51+
52+
_git_prompt() {53+
local git_status="`git status -unormal 2>&1`"54+
if ! [[ "$git_status" =~ Not\ a\ git\ repo ]]; then55+
if [[ "$git_status" =~ nothing\ to\ commit ]]; then56+
local ansi=4257+
elif [[ "$git_status" =~ nothing\ added\ to\ commit\ but\ untracked\ files\ present ]]; then58+
local ansi=4359+
else60+
local ansi=4561+
fi62+
if [[ "$git_status" =~ On\ branch\ ([^[:space:]]+) ]]; then63+
branch=${BASH_REMATCH[1]}64+
test "$branch" != master || branch=' '65+
else66+
# Detached HEAD. (branch=HEAD is a faster alternative.)67+
branch="(`git describe --all --contains --abbrev=4 HEAD 2> /dev/null ||68+
echo HEAD`)"69+
fi70+
echo -n '\[\e[0;37;'"$ansi"';1m\]'"$branch"'\[\e[0m\] '71+
fi72+
}73+
74+
_prompt_command() {75+
PS1="`_git_prompt`"'\[\e[0;94m\]\u\[\e[97m\]@\[\e[0;94m\]DO.NY\[\e[0m\]:\[\e[0;90m\]\w\[\e[0m\]\$ '76+
# PS1="`_git_prompt`"'$ '77+
}78+
PROMPT_COMMAND=_prompt_command79+
80+
###End Git_prompt81+
82+
checkgzip() { curl -sI -H 'Accept-Encoding: gzip,deflate' $1 |grep Content-Encoding --color; }public/2015/index.htmlmodifiedView file
Loading diff…