Mendhak / Code

?, a simple CLI lookup tool

As I spend a lot of time on the CLI, I often need to look up commands, even if I’ve used them before. I like to offload memory elsewhere if I don’t need to remember things, including commands, boilerplate code, birthdays, phone numbers and so on, and do a search…

Use threat modelling to choose a password manager

Common ways of choosing a password manager are to see what everyone else is using, search for what’s popular, or just pick something convenient. I do the same, but also want to spend some time evaluating my choices because password managers are the ‘keys to the kingdom’. Threat modelling feels…

.NET’s underrated configuration feature

My favorite kind of features are usually ones that let you start simple and still let you build powerfully on top without being overwhelming. .NET’s ConfigurationBuilder being one, is one of my favorite framework features. It’s used regularly in codebases, without much thought given to it, but I wanted to…

The unpleasant hackiness of CSS dark mode toggles

There are two ways that websites can offer users a choice between light and dark mode. The first makes use of pure CSS and is managed natively by the browser. The other involves a combination of CSS and Javascript and is usually accompanied by a sun/moon toggle that the user…

My Kobo Customizations

I recently switched from a Kindle device to a Kobo Libra 2, and have been playing around with its customization and tweaks. These are the ones I’ve found useful so far. They include dark mode, immersive reading, less fidgeting, Instapaper and Overdrive. Most important is integration with Calibre Web, and…

Wildcard certificates are not always a security risk

The common, prevailing advice given regarding TLS certificates is to avoid using wildcard certificates. That is, when securing a domain, it is considered a best practice to use a certificate for mydomain.example.com instead of *.example.com.

I had fun learning about Linux localization and fonts

I have a simple epaper dashboard project, which displays the time, date, weather and calendar entries. Of course the format is entirely specific to English, and I had naïvely assumed that everyone would understand “Friday Feb 17, 2023” and “5:20 PM”. When I received a feature request to display the…