Skip to content

Instantly share code, notes, and snippets.

@bukowa
Last active February 16, 2023 05:34
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 bukowa/13258f3ac082b02901e1defeb430449f to your computer and use it in GitHub Desktop.
Save bukowa/13258f3ac082b02901e1defeb430449f to your computer and use it in GitHub Desktop.
bash
# spinner, progress bar
https://stackoverflow.com/questions/238073/how-to-add-a-progress-bar-to-a-shell-script/238094#238094
# kubectl get all api resources separated by comma
kubectl api-resources -o name | paste -sd, -
# gpg print signing keys
gpg --list-keys --with-colons | awk -F: '/^pub:/ { print $5 }'
# gpg generate and export
gpg --generate-key
GPG_KEY=$(gpg --list-keys --with-colons | awk -F: '/^pub:/ { print $5 }' | tail -1)
gpg --armor --export $GPG_KEY
# digitalocean delete all ssh keys
doctl compute ssh-key list --format=ID | sed '1d' | xargs -I {} doctl compute ssh-key delete -f {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment