kuda.ai

Thoughts on programming and music theory.

Today I Learned

Use vim with ssh

July 18, 2025

You can open your files on the remote server directly in your local vim.

vim

Make /etc/passwd read-friendly

July 10, 2025

If you cat /etc/passwd, the output is not very read-friendly. Pipe stdout to column to make it awesome.

linux

Scroll in tmux with vi bindings

July 10, 2025

In tmux, you can scroll your pane with your keyboard in copy-mode. You can use vi key bindings to scroll.

tmux

Pretty Print $PATH

July 10, 2025

When you echo $PATH, the output is not read-friendly. Here is a simple way to spread each path on a new line instead of using colons.

linux

Better Terminal Prompt (easy)

July 2, 2025

The default prompt is not ideal to help you at the terminal. With a simple update of the PS1 (bash) or the PROMPT (zsh) env var, you can have a much better terminal experience.

terminals

Clean Docker Build Agents

June 16, 2025

Your docker build agent VMs will likely fill your disk soon. Here is a cron job to clean the build cache regularly.

linux/cron

azure devops: spread long conditions to multiple lines

April 30, 2025

use yaml syntax to spread long lines to multiple lines.

AzureDevOps/YAML

Bytes: SI Units vs IEC Units

April 23, 2025

MB is based on powers of 10 (1000 * 1000 Bytes), MiB is based on powers of 2 (1024 * 1024 Bytes).

ComputerScience

How to send epub to your kindle.

April 18, 2025

Visit amazon.de/sendtokindle to send epub books or pdfs to your kindle.

varia

Go Routes Signature Return Types

April 18, 2025

When you setup your routes, you return *http.ServeMux. If you wrap mux into middleware, you return http.Handler.

programming/golang

Prometheus: PromQL to show 0 instead of "no data".

April 17, 2025

When you have counters with labels, they are not initialised by default. Here are queries that showed me 0 instead of “no data”.

prometheus/promql

Darkmode Rules in CSS via media queries.

April 9, 2025

The browser knows when the system settings use dark mode. In CSS, you can use that information with @media (prefers-color-scheme: dark).

web/design/css

How to use variables in CSS.

April 9, 2025

In vanilla CSS, you can define variables and use them throughout your document.

web/design/css

Render rows in a single column in psql.

April 7, 2025

If your table is too large or your screen not wide enough, you can render your rows in a single column with \x on.

psql

Postgres: Users And Groups Are Roles

April 6, 2025

In Postgres, there are no users and no groups, just roles.

postgres

How Form Submissions Are Represented In HTTP

April 6, 2025

Forms in HTTP are represented as email=david%40gmail.com&password=pa55word.

networking/http