Skip to content

Instantly share code, notes, and snippets.

varesa@winamp:~$ mpd -V
Music Player Daemon 0.23.12 (0.23.12)
Copyright 2003-2007 Warren Dukes <warren.dukes@gmail.com>
Copyright 2008-2021 Max Kellermann <max.kellermann@gmail.com>
This is free software; see the source for copying conditions. There is NO
warranty; not even MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Database plugins:
simple proxy upnp
[
{
"id": 0,
"type": "PipeWire:Interface:Core",
"version": 4,
"permissions": [ "r", "x", "m" ],
"info": {
"cookie": 3141838123,
"user-name": "streamserver",
"host-name": "streamserver2.idm.wappuradio.fi",
Apr 17 23:16:25 streamserver2.idm.wappuradio.fi pipewire[1139]: D mod.roc.lib [latency_tuner.cpp:419:roc_audio]: latency tuner: e2e_latency=0(0.000ms) niq_latency=88235(2000.794ms) target_latency=88200(2000.000ms) jitter=0(0.000ms) stale=105(2.381ms) fe=0.999995 eff_fe=0.999995
Apr 17 23:16:25 streamserver2.idm.wappuradio.fi pipewire[1139]: D mod.roc.lib [latency_tuner.cpp:419:roc_audio]: latency tuner: e2e_latency=0(0.000ms) niq_latency=88390(2004.308ms) target_latency=88200(2000.000ms) jitter=0(0.000ms) stale=165(3.741ms) fe=1.000053 eff_fe=1.000053
Apr 17 23:16:30 streamserver2.idm.wappuradio.fi pipewire[1139]: D mod.roc.lib [speex_resampler.cpp:289:roc_audio]: speex resampler: ratio=1/1 rates=44100/44100 latency=8 latency_diff=0
Apr 17 23:16:30 streamserver2.idm.wappuradio.fi pipewire[1139]: D mod.roc.lib [depacketizer.cpp:329:roc_audio]: depacketizer: ts=2393576948 loss_ratio=0.00006
Apr 17 23:16:30 streamserver2.idm.wappuradio.fi pipewire[1139]: D mod.roc.lib [latency_tuner.cpp:419:roc_audio]: latency t
#!/bin/bash
BROADCAST_ID="$(pw-dump | jq '.[]|select(.info.props["node.name"] == "broadcast")|.id')"
pw-record --target="$BROADCAST_ID" --rate=44100 -
import threading
from collections import defaultdict
from datetime import datetime, timezone
import kopf
import kubernetes
from compiler import compile_login_config, compile_roles_properties, compile_users_properties
from hasher import hash_password
from secret_writer import write_compiled_secret
@varesa
varesa / puppet.md
Last active January 20, 2026 17:22

this weeks first "was it really that simple all along":

Somebody wrote a puppet module that installs an app (mokey). Running the puppet agent shows it creates the systemd unit file and restarts the app. Every time

root@jeemoi:~# puppet agent -t
Notice: .../Systemd::Unit_file[mokey.service]/File[/etc/systemd/system/mokey.service]/ensure: created (corrective)
...
Notice: .../Systemd::Unit_file[mokey.service]/Service[mokey.service]: Triggered 'refresh' from 2 events
Notice: Applied catalog in 3.26 seconds

Among a lot of other broken stuff, I have this logical switch in OVN with a bunch of VMs attached to it across multiple hosts:

kvm01 ~ # ovn-nbctl --no-leader show 7ccb8ed6-b84c-4035-aa8d-544458dc0031
switch 7ccb8ed6-b84c-4035-aa8d-544458dc0031 (networking-edge-vpn-link)
    port 2ed2c175-7a10-43ab-903d-0b8035b36803
        addresses: ["52:54:00:10:f2:bc dynamic"]
    port a944e70a-1552-4e5a-a0be-758a055374c6    -- server-vm
        addresses: ["52:54:00:58:c5:fd dynamic"]
    port 728f5d92-ab57-4aaf-bc3e-5d333f83354d    -- fw-vm
# digging from shell history...
7138 ceph orch host drain kvm03
7140 ceph orch host rm kvm03
7147 ceph orch host rm kvm03 --rm-crush-entry
root@kvm05:/etc/libvirt/qemu# rpm-ostree rebase ostree-unverified-registry:registry.acl.fi/public/fcos:20250426-215206-c9f7c1727b7e6e1da4ff2aee22d13d25d0027847
Pulling manifest: ostree-unverified-registry:registry.acl.fi/public/fcos:20250426-215206-c9f7c1727b7e6e1da4ff2aee22d13d25d0027847
Importing: ostree-unverified-registry:registry.acl.fi/public/fcos:20250426-215206-c9f7c1727b7e6e1da4ff2aee22d13d25d0027847 (digest: sha256:8c8a885e82344b7fea11383819db85412f2e0f35117e1ee96410bedf6e4e4147)
ostree chunk layers already present: 2
ostree chunk layers needed: 49 (776.4 MB)
custom layers needed: 2 (602.4 MB)
[0/51] Fetching ostree chunk 628d3905a0421ea2871 (42.1 MB)... done
[1/51] Fetching ostree chunk a3f365fed8ebd9b696e (36.5 MB)... done
[2/51] Fetching ostree chunk 2104cee6e883e70d9ee (39.3 MB)... done
[3/51] Fetching ostree chunk edf303aee9efe90e25b (69.7 MB)... done
streamserver@streamserver1:~$ cat .config/pipewire/pipewire.conf.d/custom.conf
#
# Sources
#
context.modules = [
{
name = libpipewire-module-roc-source
args = {
local.ip = 0.0.0.0
resampler.profile = low