kuda.ai

Thoughts on programming and music theory.

Today I Learned

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

How to send epub to your kindle.

April 18, 2025

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

varia

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

How Form Submissions Are Represented In HTTP

April 6, 2025

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

networking/http

Postgres: Users And Groups Are Roles

April 6, 2025

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

postgres