2025-07-01

25-06#

Tab cleanup#

monkey patching is software bankruptcy#

Hynek Schlawack (author of structlog and svcs) uses his video about design pressure to quote Brandon Rhodes’ keynote at North Bay Python 2017.

minio alternatives#

open webui token stats#

I want to see tokens used per model and over time.

OpenTelemetry#

Via Open WebUI:

e-wrapper#

A tool reported a file path with a line number like this:

/foo/bar:123

I wanted to open vim:

v /foo/bar:123

But this does not work, because vim correctly interprets the colon as part of the path.

I thought: “Well, I could edit my v command, but this did not sit well, because

  1. v is just an alias to vim

  2. being strict is a good thing here

Another command would be useful. I did not use the single letter e, so I ran

e /foo/bar:123

… and was greeted with

Command 'e' not found, but can be installed with:
sudo apt install e-wrapper

What does e-wrapper do (apt show e-wrapper)?

All or almost all Unix editors support the syntax of "editor +42 file", to
 open the given file and start with the cursor at line 42.  Alas, the syntax
 programs that output such data use is different: either "file:42: Something"
 or "file:42:1: Something", :1 being a column number.

Nice! Somebody did exactly what I was planning on doing and shared it freely. I love open source software! ♥️

sudo apt install e-wrapper
e /foo/bar:123

Laniakea Supercluster#

We live in the Laniakea supercluster. Thanks to Adam Borowski aka. kilobyte (author of e-wrapper)!

MCP#

KDE Connect#

Logs:

journalctl _COMM=kdeconnectd
tail -f ~/.xsession-errors

I had no devices, even though the following worked on the respective peers:

# from locutus
netcat -z -v sx 1714-1764
# from sx
netcat -z -v locutus 1714-1764

via

Problem was (as per ~/.xsession-errors):

kdeconnect.core: Too many remembered identities, ignoring "183508fecd664ea2928f025348d5cf36" received via TCP

Solution:

rm -r ~/.cache/kdeconnect.app/qmlcache/
killall kdeconnectd
# start menu > re-open KDE Connect

Gitlab Terraform Remote State Token#

Go to https://git.example.com/-/user_settings/personal_access_tokens

Create new Personal access token with

  • scopes:

    • api

Source: https://docs.gitlab.com/user/infrastructure/iac/terraform_state/#use-your-gitlab-backend-as-a-remote-data-source

Kubernetes Disk Pressure#

I was facing evicted pods due to disk pressure, e.g. k describe node w1 | rg KubeletHasDiskPressure. According to the docs, the defaults for Linux are:

  • memory.available<100Mi

  • nodefs.available<10%

  • imagefs.available<15%

  • nodefs.inodesFree<5%

  • imagefs.inodesFree<5%

To check the kubelet config of a specific node:

kubectl proxy # ... and in another terminal:
curl -X GET http://127.0.0.1:8001/api/v1/nodes/w1/proxy/configz | jq .

https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/#viewing-the-kubelet-configuration

I [configured k3s][] to use more of the available disk space before evicting pods. Note that this works for version 1.32 (k3s --version) and above.

cat <<EOF > /var/lib/rancher/k3s/agent/etc/kubelet.conf.d/50-eviction-thresholds.conf
kind: KubeletConfiguration
evictionHard:
  imagefs.available: 2%
  nodefs.available: 3%
evictionMinimumReclaim:
  imagefs.available: 4%
  nodefs.available: 4%
EOF

systemctl restart k3s-agent.service

Verify

curl -X GET http://127.0.0.1:8001/api/v1/nodes/w1/proxy/configz | jq .kubeletconfig.evictionHard