Created
December 16, 2016 19:59
-
-
Save jfairley/544822d6f434d8dc816bd6a80a71ba64 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Path to your oh-my-zsh configuration. | |
ZSH=$HOME/.oh-my-zsh | |
# 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="arrow" | |
# ZSH_THEME="pygmalion" | |
# ZSH_THEME="juanghurtado" | |
# ZSH_THEME="miloshadzic" | |
ZSH_THEME="theunraveler" | |
DEFAULT_USER="jfairley" | |
# Example aliases | |
# alias zshconfig="mate ~/.zshrc" | |
# alias ohmyzsh="mate ~/.oh-my-zsh" | |
# Set to this to use case-sensitive completion | |
# CASE_SENSITIVE="true" | |
# Comment this out to disable bi-weekly auto-update checks | |
# DISABLE_AUTO_UPDATE="true" | |
# Uncomment to change how often before auto-updates occur? (in days) | |
# export UPDATE_ZSH_DAYS=13 | |
# Uncomment following line if you want to disable colors in ls | |
# DISABLE_LS_COLORS="true" | |
# Uncomment following line if you want to disable autosetting terminal title. | |
# DISABLE_AUTO_TITLE="true" | |
# Uncomment following line if you want to disable command autocorrection | |
# DISABLE_CORRECTION="true" | |
# Uncomment following line if you want red dots to be displayed while waiting for completion | |
# COMPLETION_WAITING_DOTS="true" | |
# Uncomment 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" | |
# 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/pluginse | |
# Example format: plugins=(rails git textmate ruby lighthouse) | |
plugins=(brew brew-cask cake colorize docker docker-compose gitfast mvn nmap osx rsync zsh_reload) | |
source $ZSH/oh-my-zsh.sh | |
# Customize to your needs... | |
setopt NO_NOMATCH | |
export ARTIFACTORY_USERNAME=jfairley | |
export ARTIFACTORY_PASSWORD=**redacted** | |
export ACTIVATOR_HOME=/Users/jfairley/Development/activator-dist-1.3.10/bin | |
export GOROOT=/usr/local/opt/go/libexec/bin | |
export IDEA_HOME=/Applications/IntelliJ\ IDEA\ 13\ CE.app/Contents/MacOS | |
export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=1024m -Djava.awt.headless=true" | |
# export JAVA6_HOME=`/usr/libexec/java_home -v 1.6` | |
export JAVA7_HOME=`/usr/libexec/java_home -v 1.7` | |
export JAVA8_HOME=`/usr/libexec/java_home -v 1.8` | |
export JAVA_HOME=$JAVA8_HOME | |
java7() { export JAVA_HOME=$JAVA7_HOME && java -version } | |
java8() { export JAVA_HOME=$JAVA8_HOME && java -version } | |
export ES_HEAP_SIZE=2g | |
export LESS='-R' | |
export LESSOPEN='|~/.lessfilter %s' | |
# export M2_HOME=/usr/local | |
export PATH=$PATH:$ACTIVATOR_HOME:$GOROOT:$IDEA_HOME:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/Users/jfairley/bin | |
export FLEXPATH=/Users/jfairley/Development/flex_sdks/4.9.1 | |
export STUDIO_BUILD_DIR=/Users/jfairley/Development/studio_build_dir/ | |
export CEP_DIR=/Library/Application\ Support/Adobe/CEP/extensions/ | |
export GITHUB_TOKEN=**redacted** | |
export SLACK_BOT_TOKEN=**redacted** | |
export SLACK_BOT_DEBUG=true | |
export SLACK_BOT_STORAGE=./storage | |
## | |
## JIRA plugin | |
## | |
export JIRA_URL=https://levelsbeyond.atlassian.net | |
## | |
## dotfiles config | |
## | |
alias config='git --git-dir=$HOME/.cfg --work-tree=$HOME' | |
## | |
## the fuck | |
## | |
alias fuck='eval $(thefuck $(fc -ln -1))' | |
# You can use whatever you want as an alias, like for Mondays: | |
alias fk='fuck' | |
alias FUCK='fuck' | |
# ZSH shortcuts | |
alias zshconfig="vi ~/.zshrc" | |
# Directory shortcuts | |
ws () { cd ~/Development/workspace/$1 } | |
# IntelliJ shortcut | |
alias ij='open -a /Applications/IntelliJ\ IDEA.app/Contents/MacOS/idea .' | |
# List direcory contents | |
alias lsa='ls -lah' | |
alias ll='ls -la' | |
# git shortcuts | |
alias gs='git status' | |
alias gsi='git status --ignored' | |
alias gf='git fetch' | |
alias gc='git commit' | |
alias gca='git commit --amend' | |
alias gb='git branch -vv' | |
alias gco='git checkout' | |
alias pull='git pull' | |
alias push='git push' | |
alias gsoft='git reset --soft HEAD^' | |
alias ghard='git reset --hard HEAD^' | |
function gfs() { | |
git fetch | |
git status | |
} | |
function gc-amend() { | |
git commit --amend --no-edit | |
} | |
## process port killer | |
function port-killer() { | |
echo "Killing any process connected to port $1 ..." | |
sudo lsof -i :$1 | grep node | awk '{print $2}' | xargs kill -9 | |
} | |
# docker | |
function start-cloudform() { | |
docker-machine start cloudform-docker | |
eval "$(docker-machine env cloudform-docker)" | |
} | |
function stop-cloudform() { | |
docker-machine stop cloudform-docker | |
} | |
function start-studio() { | |
docker-machine start studio-docker | |
eval "$(docker-machine env studio-docker)" | |
} | |
function stop-studio() { | |
docker-machine stop studio-docker | |
} | |
function mount-studio() { | |
mkdir /Volumes/media | |
sudo route -n add 172.17.0.253/16 docker | |
sudo mount -t nfs -o resvport "`docker inspect studiodocker_nfs-server_1 | grep \\\"IPAddress\\\" | grep -E -o \"([0-9]{1,3}.){3}[0-9]{1,3}\" | head -1`:/media" /Volumes/media | |
} | |
function unmount-studio() { | |
diskutil unmount /Volumes/media | |
} | |
# mvn shortcuts | |
function mvn-update() { | |
version=$1 | |
while [[ $version = "" ]] do | |
echo -n "New maven version: " | |
read version | |
done | |
mvn versions:set versions:commit -DnewVersion=$version | |
git commit -am "changed version to [$1]" | |
} | |
function color_maven() { | |
local BLUE="" | |
local RED="" | |
local LIGHT_RED="" | |
local LIGHT_GRAY="" | |
local LIGHT_GREEN="" | |
local LIGHT_BLUE="" | |
local LIGHT_CYAN="" | |
local YELLOW="" | |
local WHITE="" | |
local NO_COLOUR="" | |
/usr/local/bin/mvn "$@" | sed \ | |
-e "s/Tests run: \([^,]*\), Failures: \([^,]*\), Errors: \([^,]*\), Skipped: \([^,]*\)/${LIGHT_GREEN}Tests run: \1$NO_COLOUR, ${RED}Failures: \2$NO_COLOUR, ${YELLOW}Errors: \3$NO_COLOUR, ${LIGHT_BLUE}Skipped: \4$NO_COLOUR/g" \ | |
-e "s/\(\[\{0,1\}WARN\(ING\)\{0,1\}\]\{0,1\}.*\)/$YELLOW\1$NO_COLOUR/g" \ | |
-e "s/\(\[ERROR\].*\)/$RED\1$NO_COLOUR/g" \ | |
-e "s/\(\(BUILD \)\{0,1\}FAILURE.*\)/$RED\1$NO_COLOUR/g" \ | |
-e "s/\(\(BUILD \)\{0,1\}SUCCESS.*\)/$LIGHT_GREEN\1$NO_COLOUR/g" \ | |
-e "s/\(\[INFO\] [^-].*\)/$LIGHT_GRAY\1$NO_COLOUR/g" \ | |
-e "s/\(\[INFO\] -.*\)/$LIGHT_GREEN\1$NO_COLOUR/g" | |
return $PIPESTATUS | |
} | |
alias mvn=color_maven | |
# colored man pages | |
# http://boredzo.org/blog/archives/2016-08-15/colorized-man-pages-understood-and-customized | |
man() { | |
env \ | |
LESS_TERMCAP_md=$'\e[1;36m' \ | |
LESS_TERMCAP_me=$'\e[0m' \ | |
LESS_TERMCAP_se=$'\e[0m' \ | |
LESS_TERMCAP_so=$'\e[1;40;92m' \ | |
LESS_TERMCAP_ue=$'\e[0m' \ | |
LESS_TERMCAP_us=$'\e[1;32m' \ | |
man "$@" | |
} | |
# n | |
export N_PREFIX="$HOME/n"; [[ :$PATH: == *":$N_PREFIX/bin:"* ]] || PATH+=":$N_PREFIX/bin" # Added by n-install (see http://git.io/n-install-repo). | |
# ifconfig | |
alias ips="ifconfig -a | perl -nle'/(\d+\.\d+\.\d+\.\d+)/ && print $1'" | |
# The next line updates PATH for the Google Cloud SDK. | |
export PATH=/Users/jfairley/google-cloud-sdk/bin:$PATH | |
export PATH=/usr/local/bin:$PATH | |
# added by travis gem | |
[ -f /Users/jfairley/.travis/travis.sh ] && source /Users/jfairley/.travis/travis.sh | |
# collaborate | |
export SECURITY_SERVICE_DIR=~/Development/workspace-git/security-service | |
export ASSET_SERVICE_DIR=~/Development/workspace-git/asset-service | |
export DELIVERY_SERVICE_DIR=~/Development/workspace-git/delivery-service | |
export METADATA_SEARCH_SERVICE_DIR=~/Development/workspace-git/metadata-search-service | |
export ANALYTICS_SERVICE_DIR=~/Development/workspace-git/analytics-service | |
export AWS_CREDS=~/.aws |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment