Guest User

Untitled

a guest
Oct 1st, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.07 KB | None | 0 0
  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. # ZSH_THEME="af-magic"
  17. ZSH_THEME="spaceship"
  18.  
  19. # Spaceship-theme prompt on
  20. SPACESHIP_PROMPT_ORDER=(user dir host git package xcode exec_time line_sep battery vi_mode jobs char)
  21. SPACESHIP_VI_MODE_INSERT="[vi-i]"
  22. SPACESHIP_VI_MODE_NORMAL="[vi-c]"
  23.  
  24. # Uncomment the following line to use case-sensitive completion.
  25. # CASE_SENSITIVE="true"
  26.  
  27. # Uncomment the following line to disable bi-weekly auto-update checks.
  28. # DISABLE_AUTO_UPDATE="true"
  29.  
  30. # Uncomment the following line to change how often to auto-update (in days).
  31. # export UPDATE_ZSH_DAYS=13
  32.  
  33. # Uncomment the following line to disable colors in ls.
  34. # DISABLE_LS_COLORS="true"
  35.  
  36. # Uncomment the following line to disable auto-setting terminal title.
  37. DISABLE_AUTO_TITLE="true"
  38.  
  39. # Uncomment the following line to enable command auto-correction.
  40. # ENABLE_CORRECTION="true"
  41.  
  42. # Uncomment the following line to display red dots whilst waiting for completion.
  43. COMPLETION_WAITING_DOTS="true"
  44.  
  45. # Uncomment the following line if you want to disable marking untracked files
  46. # under VCS as dirty. This makes repository status check for large repositories
  47. # much, much faster.
  48. DISABLE_UNTRACKED_FILES_DIRTY="true"
  49. KEYTIMEOUT=1
  50.  
  51. # Uncomment the following line if you want to change the command execution time
  52. # stamp shown in the history command output.
  53. # The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
  54. # HIST_STAMPS="mm/dd/yyyy"
  55.  
  56. # Would you like to use another custom folder than $ZSH/custom?
  57. # ZSH_CUSTOM=/path/to/new-custom-folder
  58.  
  59. # Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
  60. # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
  61. # Example format: plugins=(rails git textmate ruby lighthouse)
  62. # Add wisely, as too many plugins slow down shell startup.
  63. plugins=(git brew osx common-aliases tmux npm vi-mode history-substring-search zsh-autosuggestions)
  64.  
  65. # history-substring-search = ZSH_CUSTOM/plugins/zsh-history-substring-search (from git)
  66. bindkey '^[[A' history-substring-search-up
  67. bindkey '^[[B' history-substring-search-down
  68. bindkey -M vicmd 'k' history-substring-search-up
  69. bindkey -M vicmd 'j' history-substring-search-down
  70.  
  71. # User configuration
  72.  
  73. export PATH="/usr/local/Cellar/jruby/9.1.13.0/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"
  74. # 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:$PATH"
  75. # export MANPATH="/usr/local/man:$MANPATH"
  76.  
  77. source $ZSH/oh-my-zsh.sh
  78.  
  79. ulimit -n 1024
  80.  
  81. # You may need to manually set your language environment
  82. # export LANG=en_US.UTF-8
  83.  
  84. # Preferred editor for local and remote sessions
  85. # if [[ -n $SSH_CONNECTION ]]; then
  86. export EDITOR='vim'
  87. # else
  88. # export EDITOR='mvim'
  89. # fi
  90.  
  91. # Compilation flags
  92. # export ARCHFLAGS="-arch x86_64"
  93.  
  94. # ssh
  95. # export SSH_KEY_PATH="~/.ssh/dsa_id"
  96. #
  97.  
  98. ## --- Functions --- ##
  99. function setjdk() {
  100. if [ $# -ne 0 ]; then
  101. removeFromPath '/System/Library/Frameworks/JavaVM.framework/Home/bin'
  102. if [ -n "${JAVA_HOME+x}" ]; then
  103. removeFromPath $JAVA_HOME
  104. fi
  105. export JAVA_HOME=`/usr/libexec/java_home -v $@`
  106. export PATH=$JAVA_HOME/bin:$PATH
  107. fi
  108. }
  109.  
  110. function removeFromPath() {
  111. export PATH=$(echo $PATH | sed -E -e "s;:$1;;" -e "s;$1:?;;")
  112. }
  113.  
  114. function watchp() {
  115. # watch the last command (excludes itself)
  116. WATCH_INT=10
  117. if [ "$#" -eq 1 ]; then
  118. WATCH_INT=$1
  119. fi
  120.  
  121. r -lnr | \
  122. grep -v '^watchp' | \
  123. head -1 | \
  124. xargs -I% watch -n $WATCH_INT %
  125. }
  126.  
  127. function sys_notify() {
  128. MESSAGE="[No Message]"
  129. if [ "$#" -gt 0 ]; then
  130. MESSAGE=$1
  131. fi
  132. osascript -e "display notification \"$MESSAGE\" with title \"CLI Message\" sound name \"Pop\""
  133. }
  134.  
  135. alias prevcmd="r -lnr | grep -v '^prevcmd' | head -1"
  136.  
  137. function prevcmd_to_alias() {
  138. if [ "$#" -lt 1 ]; then
  139. echo "Enter alias name as parameter"
  140. return 1
  141. fi
  142.  
  143. prevcmd | xargs -I{} echo "alias $1=\"{}\""
  144. }
  145.  
  146. function copyEmojiLewis() {
  147. FILE_PREFIX="lewis"
  148. if [ "$#" -gt 1 ]; then
  149. FILE_PREFIX=$2
  150. fi
  151. if [ "$#" -lt 1 ]; then
  152. pbcopy < "/Users/lsparlin/parrot/${FILE_PREFIX}_parrot.txt"
  153. return 1
  154. fi
  155.  
  156. sed "s/parrot/$1/g" "/Users/lsparlin/parrot/${FILE_PREFIX}_parrot.txt" | pbcopy
  157. }
  158.  
  159. # Set personal aliases, overriding those provided by oh-my-zsh libs,
  160. # plugins, and themes. Aliases can be placed here, though oh-my-zsh
  161. # users are encouraged to define aliases within the ZSH_CUSTOM folder.
  162. # For a full list of active aliases, run `alias`.
  163. #
  164. # Example aliases
  165. # alias zshconfig="mate ~/.zshrc"
  166. # alias ohmyzsh="mate ~/.oh-my-zsh"
  167. alias git=hub
  168. alias mmv='noglob zmv -W'
  169. alias vit='vi ~/.tmux.conf'
  170. alias srcp='source ~/.zshrc'
  171. alias srct='tmux source-file ~/.tmux.conf'
  172. alias gitrepo='cd ~/Development/git'
  173. alias cdroot='cd "$(git rev-parse --show-toplevel)"'
  174. alias rmi='rm -i'
  175. alias flushcache="sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder;"
  176. alias redis="redis-server"
  177. alias jbuildr="jruby -S buildr"
  178. alias lswc="ls | wc"
  179. alias vim-tabs='vim "+set noexpandtab"'
  180. alias spotlight_reset="sudo mdutil -E -a -i on"
  181.  
  182. # flyway
  183. 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/"'
  184. 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/"'
  185. alias flyway-boxbe='flyway -url="jdbc:mysql://127.0.0.1:3306/boxbe?autoReconnect=true&useUnicode=yes&characterEncoding=UTF-8" -locations="filesystem:/Users/lsparlin/Development/git/analyst-ng/boxbe/database/main/"'
  186. 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/"'
  187. alias flyway-boxbe-dev='flyway -url="jdbc:mysql://127.0.0.1:3306/boxbeFlywayDev?autoReconnect=true&useUnicode=yes&characterEncoding=UTF-8" -locations="filesystem:/Users/lsparlin/Development/git/analyst-ng/boxbe/database/dev-load/"'
  188. alias flyway-reset='flyway-analyst clean migrate; flyway-dev clean migrate'
  189.  
  190. # mysql
  191. alias mysql-eds='mysql -u edsro -pedsRO123 -h aurora01-cluster.cluster-c5anvjpieaue.us-east-1.rds.amazonaws.com'
  192. alias mysql-localhost='mysql -u root -proot'
  193.  
  194. alias java7='setjdk 1.7'
  195. alias java8='setjdk 1.8'
  196. alias java9='setjdk 9'
  197.  
  198.  
  199. ##
  200. ### ----- Defaults ----- ###
  201. ##
  202. setjdk 1.8
  203.  
  204. ##
  205. ### ---- Unsorted Aliases
  206. ##
Add Comment
Please, Sign In to add comment