Skip to content

Instantly share code, notes, and snippets.

@soekul
soekul / clean.md
Created March 6, 2024 23:18 — forked from Kevinrob/clean.md
Clean up microk8s registry
registry=localhost:32000
repositories=$(curl ${registry}/v2/_catalog)
for repo in $(echo "${repositories}" | jq -r '.repositories[]'); do
  echo $repo
  tags=$(curl -sSL "http://${registry}/v2/${repo}/tags/list" | jq -r '.tags[]')
  for tag in $tags; do
    echo $tag
    curl -v -sSL -X DELETE "http://${registry}/v2/${repo}/manifests/$(
 curl -sSL -I \

Keybase proof

I hereby claim:

  • I am soekul on github.
  • I am soekul (https://keybase.io/soekul) on keybase.
  • I have a public key ASAjaRjeKvUmno5iTngPhGheVVJwIbe7M2Doa0QST1u61go

To claim this, I am signing this object:

@soekul
soekul / hash_ring.py
Created June 9, 2017 15:44 — forked from reorx/hash_ring.py
Consistent hash implementation in Python.
# -*- coding: utf-8 -*-
"""
hash_ring
~~~~~~~~~~~~~~
Implements consistent hashing that can be used when
the number of server nodes can increase or decrease (like in memcached).
Consistent hashing is a scheme that provides a hash table functionality
in a way that the adding or removing of one slot
does not significantly change the mapping of keys to slots.