Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Path to your oh-my-zsh installation.
- export ZSH=$HOME/.oh-my-zsh
- export NODE_PATH='/usr/local/lib/node_modules'
- # Extra ZSH Built-Ins
- autoload -U zmv
- # Set name of the theme to load.
- # Look in ~/.oh-my-zsh/themes/
- # Optionally, if you set this to "random", it'll load a random theme each
- # time that oh-my-zsh is loaded.
- # ZSH_THEME="robbyrussell"
- # ZSH_THEME="nanotech"
- # ZSH_THEME="avit"
- ZSH_THEME="frisk"
- # Uncomment the following line to use case-sensitive completion.
- # CASE_SENSITIVE="true"
- # Uncomment the following line to disable bi-weekly auto-update checks.
- # DISABLE_AUTO_UPDATE="true"
- # Uncomment the following line to change how often to auto-update (in days).
- # export UPDATE_ZSH_DAYS=13
- # Uncomment the following line to disable colors in ls.
- # DISABLE_LS_COLORS="true"
- # Uncomment the following line to disable auto-setting terminal title.
- DISABLE_AUTO_TITLE="true"
- # Uncomment the following line to enable command auto-correction.
- # ENABLE_CORRECTION="true"
- # Uncomment the following line to display red dots whilst waiting for completion.
- # COMPLETION_WAITING_DOTS="true"
- # Uncomment the following line if you want to disable marking untracked files
- # under VCS as dirty. This makes repository status check for large repositories
- # much, much faster.
- DISABLE_UNTRACKED_FILES_DIRTY="true"
- KEYTIMEOUT=1
- # Uncomment the following line if you want to change the command execution time
- # stamp shown in the history command output.
- # The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
- # HIST_STAMPS="mm/dd/yyyy"
- # Would you like to use another custom folder than $ZSH/custom?
- # ZSH_CUSTOM=/path/to/new-custom-folder
- # Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
- # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
- # Example format: plugins=(rails git textmate ruby lighthouse)
- # Add wisely, as too many plugins slow down shell startup.
- EDITOR=vim
- PROJECT_PATHS=(~/Development/git ~/Development/git/analyst-ng/source)
- plugins=(git brew osx common-aliases tmux tmuxinator npm vi-mode history-substring-search)
- # User configuration
- 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"
- # export MANPATH="/usr/local/man:$MANPATH"
- source $ZSH/oh-my-zsh.sh
- ulimit -n 1024
- # You may need to manually set your language environment
- # export LANG=en_US.UTF-8
- # Preferred editor for local and remote sessions
- # if [[ -n $SSH_CONNECTION ]]; then
- export EDITOR='vim'
- # else
- # export EDITOR='mvim'
- # fi
- # Compilation flags
- # export ARCHFLAGS="-arch x86_64"
- # ssh
- # export SSH_KEY_PATH="~/.ssh/dsa_id"
- #
- ## --- Functions --- ##
- function getemail
- {
- s3cmd get "s3://receipts-archive.s3.aws.edatasource.com/$1" "$1.gz"
- (gunzip "./$1.gz" && mv "./$1" "./$1.eml") || \
- (mv "./$1.gz" "./$1.eml" && echo "RENAMED $1.gz -> $1.eml")
- }
- function setjdk() {
- if [ $# -ne 0 ]; then
- removeFromPath '/System/Library/Frameworks/JavaVM.framework/Home/bin'
- if [ -n "${JAVA_HOME+x}" ]; then
- removeFromPath $JAVA_HOME
- fi
- export JAVA_HOME=`/usr/libexec/java_home -v $@`
- export PATH=$JAVA_HOME/bin:$PATH
- fi
- }
- function removeFromPath() {
- export PATH=$(echo $PATH | sed -E -e "s;:$1;;" -e "s;$1:?;;")
- }
- function watchp() {
- # watch the last command (excludes itself)
- WATCH_INT=10
- if [ "$#" -eq 1 ]; then
- WATCH_INT=$1
- fi
- r -lnr | \
- grep -v '^watchp' | \
- head -1 | \
- xargs -I% watch -n $WATCH_INT %
- }
- function sys_notify() {
- MESSAGE="[No Message]"
- if [ "$#" -gt 0 ]; then
- MESSAGE=$1
- fi
- osascript -e "display notification \"$MESSAGE\" with title \"CLI Message\" sound name \"Pop\""
- }
- alias prevcmd="r -lnr | grep -v '^prevcmd' | head -1"
- function prevcmd_to_alias() {
- if [ "$#" -lt 1 ]; then
- echo "Enter alias name as parameter"
- return 1
- fi
- prevcmd | xargs -I% echo "alias $1=\"%\""
- }
- function copyEmojiLewis() {
- FILE_PREFIX="lewis"
- if [ "$#" -gt 1 ]; then
- FILE_PREFIX=$2
- fi
- if [ "$#" -lt 1 ]; then
- pbcopy < "/Users/lsparlin/parrot/${FILE_PREFIX}_parrot.txt"
- return 1
- fi
- sed "s/parrot/$1/g" "/Users/lsparlin/parrot/${FILE_PREFIX}_parrot.txt" | pbcopy
- }
- # Set personal aliases, overriding those provided by oh-my-zsh libs,
- # plugins, and themes. Aliases can be placed here, though oh-my-zsh
- # users are encouraged to define aliases within the ZSH_CUSTOM folder.
- # For a full list of active aliases, run `alias`.
- #
- # Example aliases
- # alias zshconfig="mate ~/.zshrc"
- # alias ohmyzsh="mate ~/.oh-my-zsh"
- alias git=hub
- alias mmv='noglob zmv -W'
- alias vit='vi ~/.tmux.conf'
- alias srcp='source ~/.zshrc'
- alias srct='tmux source-file ~/.tmux.conf'
- alias gitrepo='cd ~/Development/git'
- alias cdroot='cd "$(git rev-parse --show-toplevel)"'
- alias rmi='rm -i'
- alias flushcache="sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder;"
- alias redis="redis-server"
- alias mux="tmuxinator"
- # git wiki
- alias wiki="cd ~/Development/git/analyst-ng.wiki"
- alias wiki-java="vim ~/Development/git/analyst-ng.wiki/Style-Guide:-Java.md"
- # flyway
- 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/"'
- 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/"'
- 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/"'
- alias flyway-reset='flyway-analyst clean migrate; flyway-dev clean migrate'
- # mysql
- alias mysql-eds='mysql -u edsro -pedsRO123 -h aurora01-cluster.cluster-c5anvjpieaue.us-east-1.rds.amazonaws.com'
- alias mysql-localhost='mysql -u root -proot'
- alias java6='setjdk 1.6'
- alias java7='setjdk 1.7'
- alias java8='setjdk 1.8'
- ##
- ### ----- Defaults ----- ###
- ##
- setjdk 1.8
- ##
- ### ---- Unsorted Aliases
- ##
- alias lswc="ls | wc"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement