Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
|
||
txtblk='\e[0;30m' # Black - Regular | ||
txtred='\e[0;31m' # Red | ||
txtgrn='\e[0;32m' # Green | ||
txtylw='\e[0;33m' # Yellow | ||
txtblu='\e[0;34m' # Blue | ||
txtpur='\e[0;35m' # Purple | ||
txtcyn='\e[0;36m' # Cyan | ||
txtwht='\e[0;37m' # White | ||
bldblk='\e[1;30m' # Black - Bold | ||
bldred='\e[1;31m' # Red | ||
bldgrn='\e[1;32m' # Green | ||
bldylw='\e[1;33m' # Yellow | ||
bldblu='\e[1;34m' # Blue | ||
bldpur='\e[1;35m' # Purple | ||
bldcyn='\e[1;36m' # Cyan | ||
bldwht='\e[1;37m' # White | ||
unkblk='\e[4;30m' # Black - Underline | ||
undred='\e[4;31m' # Red | ||
undgrn='\e[4;32m' # Green | ||
undylw='\e[4;33m' # Yellow | ||
undblu='\e[4;34m' # Blue | ||
undpur='\e[4;35m' # Purple | ||
undcyn='\e[4;36m' # Cyan | ||
undwht='\e[4;37m' # White | ||
bakblk='\e[40m' # Black - Background | ||
bakred='\e[41m' # Red | ||
badgrn='\e[42m' # Green | ||
bakylw='\e[43m' # Yellow | ||
bakblu='\e[44m' # Blue | ||
bakpur='\e[45m' # Purple | ||
bakcyn='\e[46m' # Cyan | ||
bakwht='\e[47m' # White | ||
txtrst='\e[0m' # Text Reset | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
DIR="$(dirname ${BASH_SOURCE[0]})" | ||
. $DIR/colors | ||
|
||
[[ -n `which gsed` ]] && sed="gsed" || sed="sed" | ||
|
||
# set prompt | ||
PROMPT_COMMAND='CurDir=`pwd|$sed -e "s!$HOME!~!"|$sed -re "s!([^/]{3})[^/]+/!\1/!g"`' | ||
if [ $USER = root ]; then pscolor=$bldred; else pscolor=$bldblu; fi | ||
PS1="\[$pscolor\]\u\[$txtrst\]" | ||
if [ $SSH_TTY ]; then PS1="$PS1@\h"; fi | ||
PS1="$PS1:\[$bldylw\]\$CurDir\[$txtrst\]" | ||
PS1="$PS1"'$(__git_ps1 ":\[$bldgrn\]%s\[$txtrst\]")> ' | ||
|
||
export CLICOLOR=1 | ||
export LS_COLORS='rs=0:di=01;34:ln=01;36:hl=44;37:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:'; | ||
export SVN_EDITOR="vim" | ||
export LESS=RS # fix for mouse scroll in git diff | ||
export PATH="$DIR/../bin:$PATH" | ||
|
||
alias aals="ls -alh" | ||
alias als="ls -lh" | ||
alias byline="IFS=$'\n';" | ||
alias df="df -h" | ||
alias du="du -h" | ||
alias g='LC_ALL="C"; grep --color -s -n -r' | ||
alias loc="awk 'BEGIN { loc=0; }; /^+.*/ { ++loc }; /^-.*/ { --loc }; END { print loc}'" | ||
alias scp-x='scp -c arcfour,blowfish-cbc' | ||
alias scpr='rsync --progress -avz --partial -e ssh' | ||
alias ssh-x='ssh -c arcfour,blowfish-cbc -XC' | ||
alias sudo="sudo -E" | ||
alias timeit='python -m timeit' | ||
alias vnconce='x11vnc -safer -nopw -once -display :0 --noxdamage -ncache 10' | ||
|
||
function cdp () { cd `python -c "import os.path as _, $1; print _.dirname(_.realpath(${1}.__file__[:-1]))"`; } | ||
function wtf () { ps aux | awk '$11!~/\[*\]/ {print $6/1024" Mb --> "$11,$12,$13,$14}' | sort -g; } |