Skip to content

Instantly share code, notes, and snippets.

@powellc
Last active February 10, 2016 17:22
Show Gist options
  • Save powellc/f90872deff269f80b43f to your computer and use it in GitHub Desktop.
Save powellc/f90872deff269f80b43f to your computer and use it in GitHub Desktop.
My zshrc file
# Path to your oh-my-zsh installation.
export ZSH=~/.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="agnoster"
# 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"
# 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"
# 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.
plugins=(git)
# User configuration
export PATH="${PATH}:/opt/android-sdk-linux/platform-tools:/opt/android-sdk-linux/tools:~/.local/bin"
source $ZSH/oh-my-zsh.sh
# Preferred editor for local and remote sessions
if [[ -n $SSH_CONNECTION ]]; then
export EDITOR='vim'
else
export EDITOR='mvim'
fi
export VISUAL=/usr/bin/vim
alias opub='rake generate & rake deploy'
alias ve='source venv/bin/activate'
djsr() { venv/bin/python manage.py runserver_plus $1 }
djsh() { venv/bin/python manage.py shell_plus $1 }
djt() { find apps/ -name '*.py' | entr ./venv/bin/python manage.py test }
djv() { find apps/ -name '*.py' | entr ./venv/bin/python manage.py validate }
dj() { venv/bin/python manage.py $1 }
gtag() { git tag $1 && git push origin --tags }
gdtag() { git tag -d $1 && git push origin :refs/tags/$1 }
jrnlgo() { cd ~/diary/ && git add * && git commit -m 'Automated journal backup' && git push }
alias dockercleancontainers="docker ps -a --no-trunc| grep 'Exit' | awk '{print \$1}' | xargs -L 1 -r docker rm"
alias dockercleanimages="docker images -a -notrunc | grep none | awk '{print \$3}' | xargs -L 1 -r docker rmi"
alias dockerclean="dockercleancontainers && dockercleanimages"
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"
source ~/.autoenv/activate.sh
docbuild() { find . -name '*.rst' | entr make html }
pwp() { pass show -c personal/$1; }
pwf() { pass show -c fiveq/$1; }
newpass() { xkcdpass --numwords=4 | xclip -sel clip; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment