Guest User

Untitled

a guest
May 4th, 2015
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.64 KB | None | 0 0
  1. #--Startup-Settings-------------------------------------------------------------
  2. bind "set completion-ignore-case on" #ignore case in tab-completion
  3. bind "set show-all-if-ambiguous On" #automatically show all tab complete options
  4. bind "set bell-style none"
  5.  
  6. # rbenv
  7. export PATH=/usr/local/sbin:$PATH
  8. export PATH=$HOME/.rbenv/bin:$PATH
  9.  
  10. if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
  11.  
  12. #node & npm
  13. export PATH=$HOME/.node/bin:$PATH
  14.  
  15. # app & command aliases
  16. alias n='nano'
  17. alias o='open'
  18. alias c='clear'
  19.  
  20. alias l="ls -lsa"
  21. alias chrome='open -a "Google Chrome" '
  22. alias s='open -a "Sublime Text" '
  23.  
  24. apatschi () {
  25. chrome "http://localhost:8000"
  26. python -m SimpleHTTPServer
  27. }
  28.  
  29. mcd () { mkdir -p "$1" && cd "$1"; } # mcd: Moves a file to the MacOS trash
  30. ql () { qlmanage -p "$*" >& /dev/null; } # ql: Opens any file in MacOS Quicklook Preview
  31.  
  32. zipf () { zip -r "$1".zip "$1" ; } # zipf: To create a ZIP archive of a folder
  33.  
  34. # extract: Extract most know archives with one command
  35. # ---------------------------------------------------------
  36. extract () {
  37. if [ -f $1 ] ; then
  38. case $1 in
  39. *.tar.bz2) tar xjf $1 ;;
  40. *.tar.gz) tar xzf $1 ;;
  41. *.bz2) bunzip2 $1 ;;
  42. *.rar) unrar e $1 ;;
  43. *.gz) gunzip $1 ;;
  44. *.tar) tar xf $1 ;;
  45. *.tbz2) tar xjf $1 ;;
  46. *.tgz) tar xzf $1 ;;
  47. *.zip) unzip $1 ;;
  48. *.Z) uncompress $1 ;;
  49. *.7z) 7z x $1 ;;
  50. *) echo "'$1' cannot be extracted via extract()" ;;
  51. esac
  52. else
  53. echo "'$1' is not a valid file"
  54. fi
  55. }
  56.  
  57. alias myip='curl ip.appspot.com' # myip: Public facing IP Address
  58.  
  59. # ii: display useful host related informaton
  60. # -------------------------------------------------------------------
  61. ii() {
  62. echo -e "\nYou are logged on ${RED}$HOST"
  63. echo -e "\nAdditionnal information:$NC " ; uname -a
  64. echo -e "\n${RED}Users logged on:$NC " ; w -h
  65. echo -e "\n${RED}Current date :$NC " ; date
  66. echo -e "\n${RED}Machine stats :$NC " ; uptime
  67. echo -e "\n${RED}Current network location :$NC " ; scselect
  68. echo -e "\n${RED}Public facing IP Address :$NC " ;myip
  69. #echo -e "\n${RED}DNS Configuration:$NC " ; scutil --dns
  70. echo
  71. }
  72.  
  73. alias editHosts='sudo edit /etc/hosts' # editHosts: Edit /etc/hosts file
  74.  
  75. # lr: Full Recursive Directory Listing
  76. # ------------------------------------------
  77. alias lr='ls -R | grep ":$" | sed -e '\''s/:$//'\'' -e '\''s/[^-][^\/]*\//--/g'\'' -e '\''s/^/ /'\'' -e '\''s/-/|/'\'' | less'
  78.  
  79. # cleanupDS: Recursively delete .DS_Store files
  80. # -------------------------------------------------------------------
  81. alias cleanupDS="find . -type f -name '*.DS_Store' -ls -delete"
  82.  
  83. # colors
  84. export TERM=xterm-color
  85. export CLICOLOR=1
  86. export LSCOLORS=ExFxBxDxCxegedabagacad
  87.  
  88. alias egrep='egrep -r -n --color=auto --exclude-dir=.svn --exclude-dir=.git'
  89. alias fgrep='fgrep -r -n --color=auto --exclude-dir=.svn --exclude-dir=.git'
  90. alias grep='grep -r -n --extended-regexp --color=auto --exclude-dir=.svn --exclude-dir=.git'
  91. alias less='less -r'
  92. alias ls='ls -alh -G'
  93.  
  94. #git
  95. alias gittree='git log --graph --full-history --all --pretty=format:"%h%x09%d%x20%s"'
  96.  
  97. alias gin='cd ~/Sites/ginetta'
  98. alias sites='cd ~/Sites'
  99.  
  100. #ifconfig only wlan
  101. alias ipw='ifconfig en0 inet'
  102.  
  103. # cd to the path of the front Finder window
  104. cdf() {
  105. target=`osascript -e 'tell application "Finder" to if (count of Finder windows) > 0 then get POSIX path of (target of front Finder window as text)'`
  106. if [ "$target" != "" ]; then
  107. cd "$target"; pwd
  108. else
  109. echo 'No Finder window found' >&2
  110. fi
  111. }
  112.  
  113.  
  114. #locale
  115. export LC_CTYPE=en_US.UTF-8
  116. export LC_ALL=en_US.UTF-8
  117.  
  118. #shell prompt
  119. export PS1='\[\033[01;32m\]\u:\[\033[01;34m\]\w\[\033[00m\]\n\$ '
  120.  
  121.  
  122. #export TERM="xterm-color"
  123. #PS1='\[\e[0;33m\]\u\[\e[0m\]@\[\e[0;32m\]\h\[\e[0m\]:\[\e[0;34m\]\w\[\e[0m\]\$ '
  124.  
  125. #autocomplete
  126. #set completion-ignore-case on
  127. #set show-all-if-ambiguous on
  128. #TAB: menu-complete
  129.  
  130. #git autocomplete
  131. if [ -f ~/.git-completion.bash ]; then
  132. . ~/.git-completion.bash
  133. fi
  134.  
  135. #show archey on bootup
  136. archey -c
  137.  
  138. #more recent versions of some OS X tools (http://lapwinglabs.com/blog/hacker-guide-to-setting-up-your-mac)
  139. #PATH=$(brew --prefix coreutils)/libexec/gnubin:$PATH
  140.  
  141. #say -v "Zarvox" "hello {$USER}, I'm a new terminal" &
  142. say -v "Zarvox" "new terminal" &
  143.  
  144.  
  145. # Setting PATH for Python 3.4
  146. # The orginal version is saved in .bash_profile.pysave
  147. PATH="/Library/Frameworks/Python.framework/Versions/3.4/bin:${PATH}"
  148. export PATH
Add Comment
Please, Sign In to add comment