Last active
February 26, 2019 16:12
-
-
Save nwcell/4e7fcef356d750beb6bea538beb2b992 to your computer and use it in GitHub Desktop.
Oh My .zshrc File
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
# If you come from bash you might have to change your $PATH. | |
export PATH=$HOME/bin:/usr/local/bin:$PATH | |
export PATH="$PATH:/Applications/Sublime Text.app/Contents/SharedSupport/bin" | |
export PATH="$PATH:$HOME/.bin" | |
export PATH="/usr/local/opt/gettext/bin:$PATH" | |
export PATH="/usr/local/opt/openssl/bin:$PATH" | |
export PATH="/usr/local/opt/icu4c/bin:$PATH" | |
export PATH="/usr/local/opt/icu4c/sbin:$PATH" | |
export PATH="/usr/local/opt/node@10/bin:$PATH" | |
# Path to your oh-my-zsh installation. | |
export ZSH="/Users/travis.krause/.oh-my-zsh" | |
# Set name of the theme to load --- if set to "random", it will | |
# load a random theme each time oh-my-zsh is loaded, in which case, | |
# to know which specific one was loaded, run: echo $RANDOM_THEME | |
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes | |
ZSH_THEME="robbyrussell" | |
# Set list of themes to pick from when loading at random | |
# Setting this variable when ZSH_THEME=random will cause zsh to load | |
# a theme from this variable instead of looking in ~/.oh-my-zsh/themes/ | |
# If set to an empty array, this variable will have no effect. | |
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" ) | |
# Uncomment the following line to use case-sensitive completion. | |
# CASE_SENSITIVE="true" | |
# Uncomment the following line to use hyphen-insensitive completion. | |
# Case-sensitive completion must be off. _ and - will be interchangeable. | |
# HYPHEN_INSENSITIVE="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" | |
# Uncomment the following line if you want to change the command execution time | |
# stamp shown in the history command output. | |
# You can set one of the optional three formats: | |
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" | |
# or set a custom format using the strftime function format specifications, | |
# see 'man strftime' for details. | |
# 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? | |
# Standard 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. | |
plugins=( | |
autopep8 | |
brew | |
chucknorris | |
common-aliases | |
django | |
docker | |
git | |
jira | |
lol | |
pep8 | |
pip | |
pyenv | |
pylint | |
python | |
sublime | |
vscode | |
zsh-autosuggestions | |
) | |
source $ZSH/oh-my-zsh.sh | |
# User configuration | |
# export MANPATH="/usr/local/man:$MANPATH" | |
# You may need to manually set your language environment | |
# export LANG=en_US.UTF-8 | |
# Compilation flags | |
# export ARCHFLAGS="-arch x86_64" | |
######################################### | |
# editor stuff | |
######################################### | |
# vscode | |
alias code="code-insiders" | |
# Preferred editor for local and remote sessions | |
if [[ -n $SSH_CONNECTION ]]; then | |
export EDITOR='vim' | |
else | |
export EDITOR='code-insiders -w' | |
fi | |
######################################### | |
# SSH | |
######################################### | |
export SSH_KEY_PATH="~/.ssh/rsa_id" | |
######################################### | |
# PYENV | |
######################################### | |
export PYENV_VERSION=3.7.1 | |
eval "$(pyenv init -)" | |
######################################### | |
# PIPENV | |
######################################### | |
eval "$(pipenv --completion)" | |
######################################### | |
# GO | |
######################################### | |
# https://stackoverflow.com/questions/12843063/install-go-with-brew-and-running-the-gotour | |
export GOPATH="${HOME}/.go" | |
export GOROOT="$(brew --prefix golang)/libexec" | |
export PATH="$PATH:${GOPATH}/bin:${GOROOT}/bin" | |
test -d "${GOPATH}" || mkdir "${GOPATH}" | |
test -d "${GOPATH}/src/github.com" || mkdir -p "${GOPATH}/src/github.com" | |
######################################### | |
# OHMYZSH | |
######################################### | |
alias ohmyzsh="code ~/.oh-my-zsh" | |
alias zshconfig="code ~/.zshrc" | |
alias oh-conf="code ~/.zshrc" | |
alias oh-load="source ~/.zshrc" | |
######################################### | |
# VENV | |
######################################### | |
function v-down () { | |
if [ -n "$VIRTUAL_ENV" ]; then | |
deactivate | |
echo "Deactivated venv" | |
fi | |
} | |
function v-kill () { | |
v-down | |
if [ -d ".venv" ]; then | |
rm -rf .venv | |
echo "Removed .venv" | |
fi | |
} | |
function v-up () { | |
if [ -z "$VIRTUAL_ENV" ]; then | |
source .venv/bin/activate | |
echo "Activated venv" | |
fi | |
} | |
function v-create () { | |
v-kill | |
python -m venv .venv --clear | |
echo "Made new .venv" | |
v-up | |
pip install --upgrade pip | |
echo "Deactivated venv" | |
} | |
function v-build () { | |
v-create | |
echo "Fresh venv" | |
pip install -e . | |
echo "Fresh install of service" | |
} | |
alias v-sweep="pip freeze | grep -v "^-e" | xargs pip uninstall -y" | |
function v-freshen () { | |
echo "Clean out current Python envoironment" | |
v-sweep | |
echo "Get newest pip" | |
pip install --upgrade pip | |
echo "Install Stuff" | |
pip install cookiecutter | |
pip install ipython | |
pip install jupyter | |
pip install jupyterlab | |
pip install sphinx | |
pip install recommonmark | |
pip install flit | |
echo "Fresh Python environment is now ready." | |
} | |
function base-this () { | |
echo $1 | base64 --decode | |
} | |
function t3-install-service () { | |
v-build | |
echo "Fresh build" | |
pip install -e $HOME/Projects/t3-python-core | |
echo "Fresh install of local t3-core" | |
} | |
######################################### | |
# LPQ | |
######################################### | |
# 1) ssh -F stage-us-east-2-ssh.cfg [email protected] (adjust to match enrichment host in ec2) | |
# 2) docker ps (get the container id) | |
# 3) docker exec -it {container id} /bin/bash | |
# 4) cd src | |
# 5) ./manage.py migrate | |
function lpq-bastion-ssh () { | |
echo "Accessing LPQ Bastion $1" | |
echo "ssh -F $HOME/Projects/lpq/api-cf/deployment/stage-us-east-2-ssh.cfg ec2-user@$1 -i $HOME/Projects/lpq/lpq-bastion-keypair.pem" | |
# ssh -i $HOME/Projects/lpq/lpq-bastion-keypair.pem -F $HOME/Projects/lpq/api-cf/deployment/stage-us-east-2-ssh.cfg ec2-user@$1 | |
ssh -F $HOME/Projects/lpq/api-cf/deployment/stage-us-east-2-ssh.cfg ec2-user@$1 | |
} | |
function lpq-bastion-ssh-prod () { | |
echo "Accessing LPQ Prod Bastion $1" | |
echo "ssh -F $HOME/Projects/lpq/api-cf/deployment/prod-us-east-2-ssh.cfg ec2-user@$1" | |
ssh -F $HOME/Projects/lpq/api-cf/deployment/stage-us-east-2-ssh.cfg ec2-user@$1 | |
} | |
function mongolian-bastion-ssh-prod () { | |
echo "Accessing Mongolian Prod Bastion $1" | |
echo "ssh -F $HOME/Projects/mongolian/cf/prod-ssh.cfg ec2-user@$1" | |
ssh -F $HOME/Projects/mongolian/cf/prod-ssh.cfg ec2-user@$1 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment