Skip to content

Instantly share code, notes, and snippets.

View r0mdau's full-sized avatar

Romain Dauby r0mdau

View GitHub Profile
r0mdau /
Last active March 30, 2021 23:59 — forked from jaytaylor/
One liner for deleting images with all associated tags and a progress bar from a v2 docker registry

One liner for deleting images from a v2 docker registry

Just plug in your own values for registry and repo/image name.


tags=$(curl -sSL "http://${registry}/v2/${image}/tags/list" | jq -r '.tags[]')
r0mdau /
Created February 9, 2021 12:43 — forked from thomasdarimont/
Example for decoding a JWT Payload with your Shell (bash, zsh...)


Add this to your .profile, .bashrc, .zshrc...

decode_base64_url() {
  local len=$((${#1} % 4))
  local result="$1"
  if [ $len -eq 2 ]; then result="$1"'=='
  elif [ $len -eq 3 ]; then result="$1"'=' 
 echo "$result" | tr '_-' '/+' | openssl enc -d -base64