From 9f88e73c65b1e87a30cc029aefac19cd51108aa9 Mon Sep 17 00:00:00 2001 From: Martin Blazik Date: Fri, 18 Sep 2020 15:24:06 +0200 Subject: [PATCH] Add wisdoms to Cheatsheet --- doc/cheatsheet.md | 40 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/doc/cheatsheet.md b/doc/cheatsheet.md index dc70c49..1197308 100644 --- a/doc/cheatsheet.md +++ b/doc/cheatsheet.md @@ -1,18 +1,50 @@ -List of popular commands and shortcuts +# List of popular commands and shortcuts +## Bash +### Previous command ```bash -# from previous comand !0 - command itself !^ - first argument !$ - last argument !* - all arguments +!! - full command +``` -# Kubernetes +### Useable commands +```bash +# step back +cd - +sudo su +``` + +### To explore +```bash +ag +fzf +fd +``` + +### Script errors +```bash +set -o errexit +set -o nounset +set -o pipefail +``` + +### A shell script static analysis tool +[ShellCheck](https://github.com/koalaman/shellcheck) + + +## Kubernetes +```bash # ~/.kube/config kubectl config get-contexts kubectl config use-context +``` -# AWS +## AWS +```bash aws eks update-kubeconfig --name nas ``` +