Posted By

nerdfiles on 10/09/11


Tagged

Bash bashrc


Versions (?)

.bashrc


 / Published in: Bash
 

  1. # ============================================= PATHS == #
  2.  
  3. export PATH=$PATH:/usr/local/git/bin
  4. source ~/.cinderella.profile
  5. PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}"
  6. export PATH
  7.  
  8. # ============================================= PYTHON == #
  9.  
  10. alias python='python2.7'
  11. alias servethis="python -c 'import SimpleHTTPServer; SimpleHTTPServer.test()'"
  12.  
  13. function set_django() {
  14. # add the current directory and the parent directory to PYTHONPATH
  15. # sets DJANGO_SETTINGS_MODULE
  16. export PYTHONPATH=$PYTHONPATH:$PWD/..
  17. export PYTHONPATH=$PYTHONPATH:$PWD
  18. if [ -z "$1" ]; then
  19. x=${PWD/\/[^\/]*\/}
  20. export DJANGO_SETTINGS_MODULE=$x.settings
  21. else
  22. export DJANGO_SETTINGS_MODULE=$1
  23. fi
  24.  
  25. echo "DJANGO_SETTINGS_MODULE set to $DJANGO_SETTINGS_MODULE"
  26. }
  27.  
  28. # ============================================= ALIASES == #
  29.  
  30. # == Dir navigation == #
  31.  
  32. alias ..='cd ..'
  33. #alias cd..='cd ..'
  34. alias .='echo $PWD'
  35. alias ~='cd ~'
  36. #alias more='less'
  37.  
  38. # == File/Dir Managemenet == #
  39.  
  40. alias rm='rm -i'
  41. alias cp='cp -i'
  42. alias mv='mv -i'
  43. alias mkdir='mkdir -p'
  44.  
  45. # ============================================= MORE ALIASES == #
  46.  
  47. alias ntp="sudo /usr/sbin/ntpdate time-a.nist.gov"
  48. #alias nano='nano -w'
  49. alias vim='vim -X'
  50. #alias xcomp='xcompmgr -cCfF -r7 -o.65 -l-10 -t-8 -D7'
  51. #alias m='mate'
  52. #alias ss='./script/server'
  53.  
  54. # ============================================= COLORS == #
  55.  
  56. # @see http://norbauer.com/notebooks/code/notes/ls-colors-and-terminal-app
  57. # @see http://plug-and-pray.blogspot.com/2008/02/lscolors.html
  58.  
  59. # == Setup == #
  60.  
  61. DIR=fx
  62. SYM_LINK=gx
  63. SOCKET=fx
  64. PIPE=ax
  65. EXE=cx
  66. BLOCK_SP=dx
  67. CHAR_SP=dx
  68. EXE_SUID=hb
  69. EXE_GUID=ad
  70. DIR_STICKY=ex
  71. DIR_WO_STICKY=hx
  72. export LSCOLORS="$DIR$SYM_LINK$SOCKET$PIPE$EXE$BLOCK_SP$CHAR_SP$EXE_SUID$EXE_GUID$DIR_STICKY$DIR_WO_STICKY"
  73. export CLICOLOR="YES"
  74.  
  75. # == Aliases == #
  76.  
  77. alias ls='ls -G'
  78. alias lsa='ls -laG'
  79. alias grep='grep --color=auto'
  80.  
  81. # ============================================= UNICODE == #
  82.  
  83. #alias xterm='xterm -u8'
  84. #alias screen='screen -U'
  85.  
  86. # ============================================= SUDO == #
  87.  
  88. #alias root='sudo su'
  89. #alias pacman='sudo pacman'
  90. #alias apt-get='sudo apt-get'
  91. #alias aptitude='sudo aptitude'
  92.  
  93. # ============================================= CONSOLE == #
  94.  
  95. # Makes console terminal pretty
  96. # Slightly modified phraktured's
  97.  
  98. if [ "$TERM" = "linux" ]; then
  99. echo -en "\e]P0121212" #black
  100. echo -en "\e]P8474747" #darkgrey
  101. echo -en "\e]P1803232" #darkred
  102. echo -en "\e]P9982b2b" #red
  103. echo -en "\e]P25b762f" #darkgreen
  104. echo -en "\e]PA89b83f" #green
  105. echo -en "\e]P3AA9943" #dark yellow
  106. echo -en "\e]PBefef60" #yellow
  107. echo -en "\e]P4324c80" #darkblue
  108. echo -en "\e]PC2b4f98" #blue
  109. echo -en "\e]P55F5A90" #darkmagenta
  110. echo -en "\e]PD826ab1" #magenta
  111. echo -en "\e]P692b19e" #darkcyan
  112. echo -en "\e]PEa1cdcd" #cyan
  113. echo -en "\e]P7ffffff" #lightgrey
  114. echo -en "\e]PFdedede" #white
  115. clear #for background artifacting
  116. fi
  117.  
  118. # ============================================= MORE COLORS == #
  119.  
  120. if [ -f ~/.dir_colors ]; then
  121. eval `dircolors ~/.dir_colors`
  122. fi

Report this snippet  

You need to login to post a comment.