Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
153 lines (122 sloc) 4.1 KB
#!/bin/bash
# private stuff that doesn't get pushed to github
source '.private'
# zmodload zsh/zprof
export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/opt/openssl/lib/
RPROMPT='%D{%r}'
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
export GPG_TTY=$(tty)
# 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"
# use hyphen-insensitive completion. _ and - will be interchangeable.
HYPHEN_INSENSITIVE="true"
# display red dots whilst waiting for completion.
COMPLETION_WAITING_DOTS="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/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(git)
# export MANPATH="/usr/local/man:$MANPATH"
export ANDROID_HOME="~/Library/Android/sdk"
export PATH="$HOME/bin:/usr/local/bin:$PATH"
export PATH="$PATH:/usr/local/go/bin"
export GO111MODULE=on
source $ZSH/oh-my-zsh.sh
# increase the number of files a terminal session can have open
ulimit -n 2560
export EDITOR='nvim'
export GIT_EDITOR='nvim'
export DEFAULT_USER="$(whoami)"
# export LESS='-FXr'
alias ws=workspace
alias cls='clear;ls'
alias clsa='clear;ls -a'
alias lsa='ls -lah'
alias vimc='vim ~/.vimrc'
alias zshc='vim ~/.zshrc'
alias killdocker='docker kill $(docker ps -q)'
alias vim='nvim'
alias t='tree -I node_modules -L'
# Evals
# eval "$(ssh-agent -s)"
# eval $(thefuck --alias)
alias g='git'
alias zshup='source ~/.zshrc'
alias s='subl'
alias vo='nvim $(fzf --height 30% --reverse)'
alias v='nvim'
dns() {
curl -sI $1 | grep -E '(301|302|Server|Location|X-Cache|HTTP)'
}
findfile() {
ag -g "$1"
}
tails() {
serverless logs --tail --stage $1 --function root --startTime 1m
}
confirm() {
# call with a prompt string or use a default
read "response?Are you sure? [y/N]"
if [[ "$response" =~ ^[Yy]$ ]]
then
return 0
fi
return 1
}
alias ff='findfile'
alias ag='ag --path-to-ignore ~/.ignore'
alias gg='ag'
#. /Users/skylar/workspace/distro/install/bin/torch-activate
# tabtab source for serverless package
# uninstall by removing these lines or running `tabtab uninstall serverless`
# [[ -f /usr/local/lib/node_modules/serverless/node_modules/tabtab/.completions/serverless.zsh ]] && . /usr/local/lib/node_modules/serverless/node_modules/tabtab/.completions/serverless.zsh
# tabtab source for sls package
# uninstall by removing these lines or running `tabtab uninstall sls`
# [[ -f /usr/local/lib/node_modules/serverless/node_modules/tabtab/.completions/sls.zsh ]] && . /usr/local/lib/node_modules/serverless/node_modules/tabtab/.completions/sls.zsh
# export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
# Performance optimzations
DISABLE_UPDATE_PROMPT=true
# nvm / npm / node
nvm() {
unset -f nvm
export NVM_DIR="$HOME/.nvm"
[ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh" # This loads nvm
[ -s "/usr/local/opt/nvm/etc/bash_completion" ] && . "/usr/local/opt/nvm/etc/bash_completion"
nvm "$@"
}
node() {
unset -f node
export NVM_DIR="$HOME/.nvm"
[ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh" # This loads nvm
[ -s "/usr/local/opt/nvm/etc/bash_completion" ] && . "/usr/local/opt/nvm/etc/bash_completion"
node "$@"
}
npm() {
unset -f npm
export NVM_DIR="$HOME/.nvm"
[ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh" # This loads nvm
[ -s "/usr/local/opt/nvm/etc/bash_completion" ] && . "/usr/local/opt/nvm/etc/bash_completion"
npm "$@"
}
# Perform compinit only once a day.
autoload -Uz compinit
setopt EXTENDEDGLOB
for dump in $ZSH_COMPDUMP(#qN.m1); do
compinit
if [[ -s "$dump" && (! -s "$dump.zwc" || "$dump" -nt "$dump.zwc") ]]; then
zcompile "$dump"
fi
echo "Initializing Completions..."
done
unsetopt EXTENDEDGLOB
compinit -C
# zprof
# Install Ruby Gems to ~/gems
export GEM_HOME=$HOME/gems
export PATH=$HOME/gems/bin:$PATH
You can’t perform that action at this time.