Skip to content

Instantly share code, notes, and snippets.

@ghostsquad
Last active August 31, 2023 04:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ghostsquad/3850d009fdf18b6ee7305c327033581e to your computer and use it in GitHub Desktop.
Save ghostsquad/3850d009fdf18b6ee7305c327033581e to your computer and use it in GitHub Desktop.
aliases.sh
# Docker
alias drd='docker rmi $(docker images -f "dangling=true" -q)'
alias dre='docker rm $(docker ps -a -f status=exited -q)'
alias drc='docker rm $(docker ps -a -f status=created -q)'
alias dps='docker ps --format '\''table {{ .ID }}\t{{ .Image }}\t{{ .Names }}\t{{ .Ports }}'\'''
alias dpsa='docker ps -a --format '\''table {{ .ID }}\t{{ .Image }}\t{{ .Names }}\t{{ .Ports }}'\'''
# Git
# https://github.com/robbyrussell/oh-my-zsh/wiki/Plugin:git
# https://github.com/robbyrussell/oh-my-zsh/blob/master/plugins/git-extras/git-extras.plugin.zsh
alias git-update-fork="git pull upstream master && git push"
alias gfu='b=$(git symbolic-ref --short HEAD); git checkout main && git pull upstream main && git push && git checkout ${b}'
alias gfum='b=$(git symbolic-ref --short HEAD); git checkout master && git pull upstream master && git push && git checkout ${b}'
alias gci='git commit'
alias gca='git commit --amend --no-edit'
alias gh='git log --pretty=format:"%h %ad | %s%d [%an]" --graph --date=short'
alias gpr='git pr'
alias gpu='git pull origin master'
# https://github.com/nvie/gitflow
alias gfl='git flow'
alias pr='pull-request'
alias gpsupg='gpsup && echo "aight!" && git open'
# GNU Tools
alias grep='ggrep --color=AUTO'
alias xargs='gxargs'
alias time='/usr/bin/time'
alias timeout='gtimeout'
alias sed='gsed'
alias find='gfind'
alias date='gdate'
alias base64='gbase64'
# Miscellaneous
alias ll='gls -GFhla --color=auto '
alias ls='gls'
alias vi='vim '
# Kubernetes
# https://github.com/robbyrussell/oh-my-zsh/blob/master/plugins/kubectl/kubectl.plugin.zsh
alias k='kubectl'
alias kc='kubecfg'
alias ku='kubectl config use-context'
# Task Warrior
# https://taskwarrior.org/docs/syntax.html
alias t='task'
# Saml2Aws
# alias auth='saml2aws login --skip-prompt --force --session-duration=43200'
# Go
# alias go-reshim='asdf reshim golang && export GOV=$(asdf current golang | sed '\''s/ *(set by .*)//g'\'') && export GOROOT="$ASDFINSTALLS/golang/$GOV/go/"'
# Mage
# alias mg='./mg'
alias asc="asciinema"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment