SHARE
TWEET

Untitled

a guest May 22nd, 2017 105 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Path to your oh-my-zsh installation.
  2. export ZSH=$HOME/.oh-my-zsh
  3. export NODE_PATH='/usr/local/lib/node_modules'
  4.  
  5. # Extra ZSH Built-Ins
  6. autoload -U zmv
  7.  
  8. # Set name of the theme to load.
  9. # Look in ~/.oh-my-zsh/themes/
  10. # Optionally, if you set this to "random", it'll load a random theme each
  11. # time that oh-my-zsh is loaded.
  12. # ZSH_THEME="robbyrussell"
  13. # ZSH_THEME="nanotech"
  14. # ZSH_THEME="avit"
  15. ZSH_THEME="frisk"
  16.  
  17. # Uncomment the following line to use case-sensitive completion.
  18. # CASE_SENSITIVE="true"
  19.  
  20. # Uncomment the following line to disable bi-weekly auto-update checks.
  21. # DISABLE_AUTO_UPDATE="true"
  22.  
  23. # Uncomment the following line to change how often to auto-update (in days).
  24. # export UPDATE_ZSH_DAYS=13
  25.  
  26. # Uncomment the following line to disable colors in ls.
  27. # DISABLE_LS_COLORS="true"
  28.  
  29. # Uncomment the following line to disable auto-setting terminal title.
  30. DISABLE_AUTO_TITLE="true"
  31.  
  32. # Uncomment the following line to enable command auto-correction.
  33. # ENABLE_CORRECTION="true"
  34.  
  35. # Uncomment the following line to display red dots whilst waiting for completion.
  36. # COMPLETION_WAITING_DOTS="true"
  37.  
  38. # Uncomment the following line if you want to disable marking untracked files
  39. # under VCS as dirty. This makes repository status check for large repositories
  40. # much, much faster.
  41. DISABLE_UNTRACKED_FILES_DIRTY="true"
  42. KEYTIMEOUT=1
  43.  
  44. # Uncomment the following line if you want to change the command execution time
  45. # stamp shown in the history command output.
  46. # The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
  47. # HIST_STAMPS="mm/dd/yyyy"
  48.  
  49. # Would you like to use another custom folder than $ZSH/custom?
  50. # ZSH_CUSTOM=/path/to/new-custom-folder
  51.  
  52.  
  53. # Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
  54. # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
  55. # Example format: plugins=(rails git textmate ruby lighthouse)
  56. # Add wisely, as too many plugins slow down shell startup.
  57. EDITOR=vim
  58. PROJECT_PATHS=(~/Development/git ~/Development/git/analyst-ng/source)
  59. plugins=(git brew osx common-aliases tmux tmuxinator npm vi-mode history-substring-search)
  60.  
  61. # User configuration
  62.  
  63. export PATH="/Users/lsparlin/.rvm/gems/ruby-2.1.5/bin:/Users/lsparlin/.rvm/gems/ruby-2.1.5@global/bin:/Users/lsparlin/.rvm/rubies/ruby-2.1.5/bin:/usr/local/opt/elasticsearch/bin:/usr/local/mysql/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/opt/elasticsearch/bin:/usr/local/mysql/bin:/Users/lsparlin/.rvm/bin"
  64. # export MANPATH="/usr/local/man:$MANPATH"
  65.  
  66. source $ZSH/oh-my-zsh.sh
  67.  
  68. ulimit -n 1024
  69.  
  70. # You may need to manually set your language environment
  71. # export LANG=en_US.UTF-8
  72.  
  73. # Preferred editor for local and remote sessions
  74. # if [[ -n $SSH_CONNECTION ]]; then
  75. export EDITOR='vim'
  76. # else
  77. #   export EDITOR='mvim'
  78. # fi
  79.  
  80. # Compilation flags
  81. # export ARCHFLAGS="-arch x86_64"
  82.  
  83. # ssh
  84. # export SSH_KEY_PATH="~/.ssh/dsa_id"
  85. #
  86.  
  87. ## --- Functions --- ##
  88. function getemail
  89. {
  90.     s3cmd get "s3://receipts-archive.s3.aws.edatasource.com/$1" "$1.gz"
  91.         (gunzip "./$1.gz" && mv "./$1" "./$1.eml") || \
  92.             (mv "./$1.gz" "./$1.eml" && echo "RENAMED $1.gz -> $1.eml")
  93. }
  94.  
  95. function setjdk() {
  96.   if [ $# -ne 0 ]; then
  97.    removeFromPath '/System/Library/Frameworks/JavaVM.framework/Home/bin'
  98.    if [ -n "${JAVA_HOME+x}" ]; then
  99.     removeFromPath $JAVA_HOME
  100.    fi
  101.    export JAVA_HOME=`/usr/libexec/java_home -v $@`
  102.    export PATH=$JAVA_HOME/bin:$PATH
  103.   fi
  104.  }
  105.  
  106.  function removeFromPath() {
  107.   export PATH=$(echo $PATH | sed -E -e "s;:$1;;" -e "s;$1:?;;")
  108.  }
  109.  
  110. function watchp() {
  111. # watch the last command (excludes itself)
  112.   WATCH_INT=10
  113.     if [ "$#" -eq 1 ]; then
  114.         WATCH_INT=$1
  115.     fi
  116.  
  117.   r -lnr | \
  118.         grep -v '^watchp' | \
  119.         head -1 | \
  120.         xargs -I% watch -n $WATCH_INT %
  121. }
  122.  
  123. function sys_notify() {
  124.   MESSAGE="[No Message]"
  125.   if [ "$#" -gt 0 ]; then
  126.     MESSAGE=$1
  127.   fi
  128.   osascript -e "display notification \"$MESSAGE\" with title \"CLI Message\" sound name \"Pop\""
  129. }
  130.  
  131. alias prevcmd="r -lnr | grep -v '^prevcmd' | head -1"
  132.  
  133. function prevcmd_to_alias() {
  134.   if [ "$#" -lt 1 ]; then
  135.         echo "Enter alias name as parameter"
  136.         return 1
  137.     fi
  138.  
  139.     prevcmd | xargs -I% echo "alias $1=\"%\""
  140. }
  141.  
  142. function copyEmojiLewis() {
  143.   FILE_PREFIX="lewis"
  144.   if [ "$#" -gt 1 ]; then
  145.     FILE_PREFIX=$2
  146.   fi
  147.   if [ "$#" -lt 1 ]; then
  148.     pbcopy < "/Users/lsparlin/parrot/${FILE_PREFIX}_parrot.txt"
  149.     return 1
  150.   fi
  151.  
  152.   sed "s/parrot/$1/g" "/Users/lsparlin/parrot/${FILE_PREFIX}_parrot.txt" | pbcopy
  153. }
  154.  
  155. # Set personal aliases, overriding those provided by oh-my-zsh libs,
  156. # plugins, and themes. Aliases can be placed here, though oh-my-zsh
  157. # users are encouraged to define aliases within the ZSH_CUSTOM folder.
  158. # For a full list of active aliases, run `alias`.
  159. #
  160. # Example aliases
  161. # alias zshconfig="mate ~/.zshrc"
  162. # alias ohmyzsh="mate ~/.oh-my-zsh"
  163. alias git=hub
  164. alias mmv='noglob zmv -W'
  165. alias vit='vi ~/.tmux.conf'
  166. alias srcp='source ~/.zshrc'
  167. alias srct='tmux source-file ~/.tmux.conf'
  168. alias gitrepo='cd ~/Development/git'
  169. alias cdroot='cd "$(git rev-parse --show-toplevel)"'
  170. alias rmi='rm -i'
  171. alias flushcache="sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder;"
  172. alias redis="redis-server"
  173. alias mux="tmuxinator"
  174.  
  175. # git wiki
  176. alias wiki="cd ~/Development/git/analyst-ng.wiki"
  177. alias wiki-java="vim ~/Development/git/analyst-ng.wiki/Style-Guide:-Java.md"
  178.  
  179. # flyway
  180. alias flyway-receipts='flyway -url="jdbc:mysql://127.0.0.1:3306/receipts?autoReconnect=true&useUnicode=yes&characterEncoding=UTF-8" -locations="filesystem:/Users/lsparlin/Development/git/analyst-ng/source/ext-db/receipts/"'
  181. alias flyway-analyst='flyway -url="jdbc:mysql://127.0.0.1:3306/analyst?autoReconnect=true&useUnicode=yes&characterEncoding=UTF-8" -locations="filesystem:/Users/lsparlin/Development/git/analyst-ng/source/ext-db/analyst-ng/"'
  182. alias flyway-dev='flyway -url="jdbc:mysql://127.0.0.1:3306/analystFlywayDev?autoReconnect=true&useUnicode=yes&characterEncoding=UTF-8" -locations="filesystem:/Users/lsparlin/Development/git/analyst-ng/source/ext-db/analyst-ng-dev-load/"'
  183. alias flyway-reset='flyway-analyst clean migrate; flyway-dev clean migrate'
  184.  
  185. # mysql
  186. alias mysql-eds='mysql -u edsro -pedsRO123 -h aurora01-cluster.cluster-c5anvjpieaue.us-east-1.rds.amazonaws.com'
  187. alias mysql-localhost='mysql -u root -proot'
  188.  
  189. alias java6='setjdk 1.6'
  190. alias java7='setjdk 1.7'
  191. alias java8='setjdk 1.8'
  192.  
  193.  
  194. ##
  195. ### ----- Defaults ----- ###
  196. ##
  197. setjdk 1.8
  198.  
  199. ##
  200. ### ---- Unsorted Aliases
  201. ##
  202. alias lswc="ls | wc"
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top