Deleting All Empty Kafka Topics
7 Feb 2024
Need to quickly delete all empty kafka topics with a SASL config? This is a (meh) way.
Need xmlsec (aka xmlsec1) working in Heroku's Python? Try this:
This script helps identify what disks are in use (or not in use) by ZFS. It's a stupid-simple python 3 script that requires only 'sh'. You can get that via 'pip3 install sh'.
#!/usr/bin/python3
import re
from sh import zpool,lsblk,ls
from pprint import pprintprint("Finding all disks")
sdisks = str(lsblk('-d').stdout)
# sdbl 67:240 0 7.3T 0 disk
alldisks = re.findall(r'(sd[a-z]+)\s+\d+:\d+\s+\d+\s+(.*?)\s+\d+\s+disk',sdisks,re.MULTILINE)
print("Found %d disks on system"%len(alldisks))