checkin
This commit is contained in:
parent
8d32fff5ef
commit
ffed0e8b74
114
.aliases
Normal file
114
.aliases
Normal file
@ -0,0 +1,114 @@
|
||||
# ~/.aliases - Sourced by ~/.zshrc
|
||||
|
||||
# ── Navigation ─────────────────────────────────────────────────────────────────
|
||||
alias ..='cd ..'
|
||||
alias ...='cd ../..'
|
||||
alias ....='cd ../../..'
|
||||
alias ~='cd ~'
|
||||
|
||||
# ── ls ─────────────────────────────────────────────────────────────────────────
|
||||
alias ls='ls -G'
|
||||
alias ll='ls -lhF'
|
||||
alias la='ls -lhAF'
|
||||
alias lt='ls -lhtr' # sort by time, newest last
|
||||
|
||||
# ── General ────────────────────────────────────────────────────────────────────
|
||||
alias c='clear'
|
||||
alias q='exit'
|
||||
alias which='which -a'
|
||||
alias path='echo $PATH | tr ":" "\n"' # pretty-print PATH entries
|
||||
alias reload='source ~/.zshrc && echo "zshrc reloaded"'
|
||||
alias zshrc='$EDITOR ~/.zshrc'
|
||||
alias aliases='$EDITOR ~/.aliases'
|
||||
alias zshenv='$EDITOR ~/.zshenv'
|
||||
|
||||
# ── Git ────────────────────────────────────────────────────────────────────────
|
||||
alias g='git'
|
||||
alias gs='git status'
|
||||
alias ga='git add'
|
||||
alias gaa='git add -A'
|
||||
alias gc='git commit -m'
|
||||
alias gca='git commit --amend --no-edit'
|
||||
alias gco='git checkout'
|
||||
alias gcob='git checkout -b'
|
||||
alias gp='git push'
|
||||
alias gpf='git push --force-with-lease'
|
||||
alias gpl='git pull'
|
||||
alias gb='git branch'
|
||||
alias gbd='git branch -d'
|
||||
alias gl='git log --oneline --decorate --graph --all'
|
||||
alias gd='git diff'
|
||||
alias gds='git diff --staged'
|
||||
alias gst='git stash'
|
||||
alias gstp='git stash pop'
|
||||
|
||||
# ── Docker ─────────────────────────────────────────────────────────────────────
|
||||
alias d='docker'
|
||||
alias dps='docker ps'
|
||||
alias dpsa='docker ps -a'
|
||||
alias di='docker images'
|
||||
alias dex='docker exec -it'
|
||||
alias dlog='docker logs -f'
|
||||
alias dstop='docker stop $(docker ps -q)' # stop all running containers
|
||||
alias dclean='docker system prune -f' # remove unused data
|
||||
|
||||
# docker compose
|
||||
alias dcu='docker compose up -d'
|
||||
alias dcd='docker compose down'
|
||||
alias dcr='docker compose restart'
|
||||
alias dcl='docker compose logs -f'
|
||||
alias dcb='docker compose build'
|
||||
|
||||
# ── kubectl ────────────────────────────────────────────────────────────────────
|
||||
alias k='kubectl'
|
||||
alias kgp='kubectl get pods'
|
||||
alias kgpa='kubectl get pods -A'
|
||||
alias kgs='kubectl get services'
|
||||
alias kgd='kubectl get deployments'
|
||||
alias kgn='kubectl get nodes'
|
||||
alias klog='kubectl logs -f'
|
||||
alias kdesc='kubectl describe'
|
||||
alias kapply='kubectl apply -f'
|
||||
alias kdel='kubectl delete -f'
|
||||
alias kns='kubectl config set-context --current --namespace' # switch namespace
|
||||
alias kctx='kubectl config use-context' # switch context
|
||||
|
||||
# ── Terraform ──────────────────────────────────────────────────────────────────
|
||||
alias tf='terraform'
|
||||
alias tfi='terraform init'
|
||||
alias tfp='terraform plan'
|
||||
alias tfa='terraform apply'
|
||||
alias tfaa='terraform apply -auto-approve'
|
||||
alias tfd='terraform destroy'
|
||||
alias tfda='terraform destroy -auto-approve'
|
||||
alias tff='terraform fmt -recursive'
|
||||
alias tfv='terraform validate'
|
||||
alias tfo='terraform output'
|
||||
alias tfs='terraform state'
|
||||
alias tfsl='terraform state list'
|
||||
|
||||
# ── AWS ────────────────────────────────────────────────────────────────────────
|
||||
alias awsid='aws sts get-caller-identity' # show current identity
|
||||
alias awswho='aws configure list' # show current config
|
||||
|
||||
# Switch AWS profile: usage `awsp my-profile`
|
||||
awsp() { export AWS_PROFILE="$1" && echo "Switched to AWS profile: $1"; }
|
||||
|
||||
# ── Python / pyenv ─────────────────────────────────────────────────────────────
|
||||
alias py='python3'
|
||||
alias pip='pip3'
|
||||
alias venv='python3 -m venv .venv && source .venv/bin/activate'
|
||||
alias activate='source .venv/bin/activate'
|
||||
alias pyvers='pyenv versions'
|
||||
alias pylocal='pyenv local'
|
||||
alias pyglobal='pyenv global'
|
||||
|
||||
# ── SSH ────────────────────────────────────────────────────────────────────────
|
||||
alias sshpangolin='ssh geezo@74.208.142.212'
|
||||
|
||||
# ── Misc utilities ─────────────────────────────────────────────────────────────
|
||||
alias myip='curl -s https://icanhazip.com'
|
||||
alias ports='lsof -iTCP -sTCP:LISTEN -n -P' # show listening ports
|
||||
alias grep='grep --color=auto'
|
||||
alias df='df -h'
|
||||
alias du='du -h -d 1'
|
||||
Loading…
Reference in New Issue
Block a user