Skip to content

Instantly share code, notes, and snippets.

@afonasev
Last active September 10, 2021 07:01
Show Gist options
  • Save afonasev/042cdd77841be4391fd756f718914c3c to your computer and use it in GitHub Desktop.
Save afonasev/042cdd77841be4391fd756f718914c3c to your computer and use it in GitHub Desktop.
export ZSH=/Users/afonasev/.oh-my-zsh
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="amuse"
fpath+=~/.zfunc
autoload -U compinit && compinit
plugins=(
docker, git, django, colored-man, colorize, github,
jira, vagrant, pip, python, brew, osx,
zsh-syntax-highlighting, zsh-completions, kubectl,
adb, aws, cargo, cp, docker-compose,
git-flow, go, helm, httpie, tig, vault, vscode
)
source /usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh
source $ZSH/oh-my-zsh.sh
source <(kubectl completion zsh)
################################################
### User configuration
################################################
# enter ^M problem
stty icrnl
# ssh
export SSH_KEY_PATH="~/.ssh/rsa_id"
export LDFLAGS="-L/usr/local/opt/openssl/lib"
export CPPFLAGS="-I/usr/local/opt/openssl/include"
export PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig"
# PATH for python
PATH=/usr/local/share/python:${PATH}
# for homebrewed bottles
PATH=/usr/local/bin:/usr/local/sbin:${PATH}
# for custom scripts
PATH=$HOME/bin:${PATH}
PYTHONBREAKPOINT=ipdb.set_trace
export PATH
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
export LESS="-SR"
################################################
### Aliases
################################################
alias zshconfig="source ~/.zshrc"
alias dc="docker-compose"
alias cp='cp -r'
alias scp='scp -r'
alias rm='rm -r'
alias mkdir='mkdir -p'
alias grep='grep --colour=auto'
# alias go_vps='ssh -p 7272 afonasev@x.x.x.x -t tmux attach -t 0'
alias k=kubectl
################################################
### Functions
################################################
function tstart() {
branch=$(git symbolic-ref HEAD 2>/dev/null | cut -d"/" -f 3)
git pull origin $branch
git co -b $1
}
function tpush() {
branch=$(git symbolic-ref HEAD 2>/dev/null | cut -d"/" -f 3)
git pull --rebase --autostash origin develop
git please origin $branch
}
function tend() {
branch=$(git symbolic-ref HEAD 2>/dev/null | cut -d"/" -f 3)
git co $1 && git pull origin $1
git br -D $branch
}
function rebase() {
git rebase -i --autosquash HEAD~$1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment