Last active
April 9, 2020 12:22
-
-
Save romanitalian/c602dbb1bae2ee11158472a6684b65fd 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
alias ls='ls -GFh' | |
alias ll='ls -lah' | |
alias t='tig' | |
alias du='du -h' | |
alias dus='du -hs * | sort -hr' | |
alias gd='git diff' | |
alias gdc='git diff --cached' | |
alias gh='git log --pretty=format:"%h %ad | %s%d [%an]" --graph --date=short' | |
alias gs='git status' | |
alias gus='dus' | |
alias co='git checkout' | |
alias com='git commit -am ' | |
alias fix='git add . && git commit -m "fix"' | |
alias gg="git diff | grep -i 'fmt.Println(fmt.Sprintf('" | |
alias cd..='cd ..' | |
alias cp='cp -i' | |
alias df='df -h -x supermount' | |
alias l='ls -lapt' | |
alias ll='ls -laptc' | |
alias mc='. /usr/lib/mc/mc-wrapper.sh' | |
alias md='mkdir' | |
alias mv='mv -i' | |
alias rd='rmdir' | |
alias rm='rm -i' | |
alias su-='su -' | |
alias gq2='git rebase -i HEAD~2' | |
alias ku='kubectl' | |
alias pd='kubectl get pods' | |
alias pdg='kubectl get pods | grep -i ' | |
alias pds='kubectl get pods | grep -i ' | |
alias composer="php /usr/local/bin/composer.phar" | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
export KUBECONFIG=$HOME/wks/configs/kubectl-config/config | |
export GOPATH=$HOME/wks | |
export GOROOT=/usr/local/opt/go/libexec | |
export PATH=$PATH:$GOPATH/bin | |
export PATH=$PATH:$GOROOT/bin | |
# brew install romkatv/powerlevel10k/powerlevel10k | |
# source /usr/local/opt/powerlevel10k/powerlevel10k.zsh-theme | |
export HOMEBREW_RABBITMQ=/usr/local/Cellar/rabbitmq/3.7.16/sbin/ | |
export PATH=$PATH:$HOMEBREW_RABBITMQ | |
DR="${PWD##*/}" | |
# export PS1="\u@\h \[\033[32m\]\w\[\033[33m\]\$(parse_git_branch)\[\033[00m\] $ " | |
# Load version control information | |
autoload -Uz vcs_info | |
precmd() { vcs_info } | |
# Format the vcs_info_msg_0_ variable | |
zstyle ':vcs_info:git:*' formats '%b' | |
# FOR ZSH: | |
# echo source ~/.bash_profile | |
# Set up the prompt (with git branch name) | |
setopt PROMPT_SUBST | |
# PROMPT='%n in ${PWD/#$HOME/~} ${vcs_info_msg_0_} > ' | |
# PROMPT='%n|${PWD/#$HOME/~} | %m %1d$|${vcs_info_msg_0_} > ' | |
# PROMPT='%1d [${vcs_info_msg_0_}]' | |
autoload -U colors && colors | |
# PS1="%{$fg[red]%}%n%{$reset_color%}@%{$fg[blue]%}%1d %{$fg[red]%}[${vcs_info_msg_0_}]%{$reset_color%}% $ " | |
# PROMPT="%{$fg[blue]%}%1d %{$fg[red]%}[${vcs_info_msg_0_}]%{$reset_color%}% $ " | |
PROMPT='%{$fg[blue]%}%1d %{$fg[red]%}[${vcs_info_msg_0_}]%{$reset_color%}% $ ' | |
# cd ~/wks/src/github.com/mc2soft | |
# #FOR ZSH: | |
# Git branch in prompt. | |
# parse_git_branch() { | |
# git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
# } | |
# export PS1="\u@\h \W\[\033[32m\]\$(parse_git_branch)\[\033[00m\] $ " | |
# parse_git_branch() { | |
# git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
# } | |
# export PS1="\u@\h \[\033[32m\]\w\[\033[33m\]\$(parse_git_branch)\[\033[00m\] $ " | |
about() { | |
kubectl describe pod $(kubectl get pods | grep "$1" | awk '{print $1}') | |
} | |
logs() { | |
kubectl logs $(kubectl get pods | grep "$1" | awk '{print $1}') "$2" | |
} | |
kcexec() { | |
kubectl exec -it $(kubectl get pods | grep "$1" | awk '{print $1}') -c "$2" "$3" | |
} | |
img() { | |
kubectl describe pod $(kubectl get pods | grep "$1" | awk '{print $1}') | grep -i image | |
} | |
fetch() { | |
git fetch origin "$1:$1" | |
} | |
alias kc='kubectl' | |
alias pods='kubectl get pods' | |
alias ingress='kubectl get ingress' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment