Developer Aliases

Here I collect the aliases I’m currently collecting, which help in some cloud development work

Hints:

  • Store in ~/.bashrc
  • apply with source ~/.bashrc
# Show the gitlog as a diagram
alias gitlog='git log --graph --abbrev-commit --decorate --format=format:'\''%C(bold yellow)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)'\'' --all'

# Show the gitlog as a diagram in two row format
alias gitlog2='git log --graph --abbrev-commit --decorate --format=format:'\''%C(bold yellow)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'\'''\''          %C(white)%s%C(reset) %C(dim white)- %an%C(reset)'\'' --all'

# k8s aliases
alias kDash='kubectl port-forward svc/kubernetes-dashboard -n kube-system 9090:80 &'
alias kKiali='kubectl -n istio-system port-forward $(kubectl get pod -n istio-system -l app=kiali -o jsonpath='{.items[0].metadata.name}') 20001:20001 &'
alias kPrometheus='kubectl -n istio-system port-forward $(kubectl -n istio-system get pod -l app=prometheus -o jsonpath='{.items[0].metadata.name}') 9090:9090 &'
alias kGrafana='kubectl -n istio-system port-forward $(kubectl -n istio-system get pod -l app=grafana -o jsonpath='{.items[0].metadata.name}') 3000:3000 &'