tl;dr - At the risk of continuing a flamewar, I’m going to suggest you never use merge commits. Yup, end of the year is flamewar time. The context of this particular (possibly unreasonable) suggestion comes with some context. I assume you do one of the folllowing in your hacking: Make branches (i.e. a fully private repo/one you have maintainer/committer access to) Fork repositories and make…
tl;dr - pinentry (in particular pinentry-gnome3) stopped working, pinentry-emacs didn’t work well with daemon mode, just use pinentry-gtk or pinentry-qt5. This post outlines a shallow dive into a rabbit hole for a broken pinentry setup w/ Emacs – if your setup is already working, skip this. What is pinentry? When a program like Gnu Privacy Guard (AKA GnuPG, gpg) requires user input,…
tl;dr - I wrote some Inter-Process Communication (“IPC”) experiments in Rust w/ slightly more abstraction and more realistic serialization (JSON) – Check out the code. UPDATE (10/10/2024) Thanks to feedback from Reddit, I've updated my references to "throughput" to "latency" which is the more accurate description of what roundtrips measures. Rust is kinda hot right now. OK…
/ tl;dr - I switched from tmux to zellij, but returned to tmux primarily because of missing no-mouse on-screen text selection, and easy screen rotation To set the record straight – both tools are great. Zellij is awesome. I made up my mind to try it for many reasons: Zellij looks great Zellij has a great set of out-of-the-box features Zellij is extendable Zellij is written in Rust Obviously,…
TL;DR This post exists because I forgot how to start locally installed Postgres before a talk. I don’t normally have a section like this, but since I’ll probably be the one referencing this post again in the future: apt install postgres # or whatever for your distro initdb --no-locale -D <data-dir> pg_ctl -D <data-dir> -l <log-file> start on MacOS: brew install postgresql brew services…
tl;dr - Update your Cargo.toml and make sure doc_auto_cfg is turned on in lib.rs How do you properly show feature specific functionality (and mark them with the required feature) for library crates in 2024? First, you need to update your Cargo.toml: [package.metadata.docs.rs] all-features = true If you don’t want all features to be enabled (if you want some features and related code to be…
+ tl;dr - I did the thing where authors disappear for year(s) due to $DAYJOB – I’ve been working with Rust and WebAssembly. I’m going to try to write a bit more! I’m not back but it has occurred to me that this blog hasn’t seen any content in a whole year (and a day). Sorry about that – I’ve been busy working at $DAYJOB, and have been doing a lot of Rust…
+ tl;dr - The kata containers 3.0.2 documentation on custom kernels is great, but I ran into some issues, so I rehash exactly what I did below I recently spent some time exploring how to build custom kernels to work with kata, and it’s way easier than it seems, though the docs are a bit stale/don’t work as expected. Generally there are a few reasons you might want to do this, but…
Recently I ran into some GPG errors with pacman that were quite frustrating to fix. The symptoms look something like this when trying to run a command like sudo pacman -Syu: error: GPGME error: No data error: GPGME error: No data error: GPGME error: No data :: Synchronising package databases... core 974.9 KiB 1134 KiB/s 00:01 [#########################################################] 100% extra…
tl;dr - Some tips for writing better makefiles (using preambles, generating help text), and why you might want to use just instead. The makefile preamble This preamble is online @ davis-hansson.com SHELL := bash .ONESHELL: .SHELLFLAGS := -eu -o pipefail -c .DELETE_ON_ERROR: MAKEFLAGS += --warn-undefined-variables MAKEFLAGS += --no-builtin-rules ifeq ($(origin .RECIPEPREFIX), undefined) $(error…
tl;dr - I hopped on the Software Sessions podcast to talk about yak shaving and some projects I’ve been working on. Take a Listen (it’s kinda long so consider the transcript as well) I was contacted a while ago by Jeremy who runs the Software Sessions podcast. I’d actually come across his Podcast in the past so I was super excited to get a chance to interview and talk about some…
tl;dr - A combination of pre-baked very heavy docker images, sccache, and explicitly setting CARGO_HOME and CARGO_TARGET_DIR will do it. If you’re squeamish about large docker images in your build pipeline, close this tab. Today was the last day I put up with unnecessary rebuilds in my Rust CI pipelines. Sure, I probably shouldn’t have ported this particular project to Rust (Nimbus is…
tl;dr - Your program should support 465 and optionally 587 – implicit TLS via submissions over port 465 is where we’re moving to, according to RFC 8314 from 2018. UPDATE (2022/12/05) Thanks to some feedback from very helpful folks on r/sysadmin, it's clear that STARTTLS is even worse than I thought! After experiencing a bit of pain making my somewhat complicated email setup work…
tl;dr - You should be using direnv to load ENV variables dynamically per-project. You don’t necessarily have to buy into the entirety of the 12 factor app manifesto, but you should almost definitely be using ENV-as-configuration by this point. Even if it’s just a CONFIG ENV var that points to a config.toml that your application reads, passing configuration via environment variables is…
tl;dr - __dirname and package information are a bit harder to get from an ES module. In case you’re not using them yet, take a second to read up on Javascript (“ES” – EMCAScript) modules – they’re quite the large feature/platform change, big steps up (mostly) from CommonJS and RequireJS (AMD). One of the things that isn’t quite as nice as RequireJS in…
tl;dr - I started a newsletter called Awesome F/OSS – I’m featuring one awesome Free and Open Source project every day for the next… forever(?). I’ve got an huge list of Free and Open Source (F/OSS) projects that I think are awesome. I get to recommend them to friends and help people pick solutions a few times a month, but lately it’s felt like only being able to…
tl;dr - Crypto does have a few usecases, ETH2’s switch to Proof of Stake means it’s worth building on, and Blockchain represents a chance to reshape policy and regulation that is ossified. Slightly longer TL;DR I am keenly aware of how much everyone hates reading about crypto so I’m going to try and front load as much of my thesis as possible, as plainly as possible. You do not…
tl;dr - Use this shortcut (shared on RoutineHub) to open .ics files (invite.ics/calendar.ics) and add them to your iOS calendar You know those attachment files that you get when someone sends you a meeting invite – invite.ics/calendar.ics? Well for some reason they don’t open right on iOS. iOS will let you review the details of the event, but won’t let you add it to your…
tl;dr - Remember FirefoxOS and the Firefox Phone(s)? I do, because I still have two (!) Fx0 handsets sitting in my closet. Remembering Firefox phone Every once in a while I like to spend some time clutching my fists and thinking about what the Firefox phone could have been. I usually feel like that after looking in my closet and running my hands across this thing: Taken on an iPhone SE2 😢
tl;dr - AWS App Runner is awesome for deploying applications/services as containers, and it can finally be used with apex domains (ex. domain.tld) It looks like App Runner has finally added support for top level domains: AWS release notes for Route53 A while back I did a mini bake-off of simple AWS container deployment mechanisms for a customer. I explored some options that are container friendly:…
tl;dr - While guest writing a Supabase blog post on how identifiers work in Postgres, I was able to build pg_idkit which makes it easier to generate new UUIDs in Postgres UUIDs are better supported in Postgres than in a lot of other databases. Postgres has the uuid datatype and you can easily generate UUIDs as primary keys with SQL like this: CREATE TABLE example ( uuid uuid PRIMARY KEY GENERATED…
tl;dr - This post was inspired by Carlos Fenollosa’s post (and the resulting discussion on HN). Self hosting email is the easiest it’s ever been – don’t let the email provider oligopoly (Gmail, Microsoft, Yahoo, etc) win. Discussion up until now: Deliverability for self-hosted emails has never been harder The top page on HN had an interesting post on it titled “After…
tl;dr - Turns out Amazon SES has an IP that is currently blocked by Spamhaus Imagine my susprise while investigating some email delivery issues lately when I discovered that Amazon SES was using an IP that is currently blacklisted by Spamhaus! The IP in question is 54.240.27.189 and of course I took images to prove it happened: And there ya have it – I don’t know what automated system…
tl;dr - Service Catalog might ahve been a redundant concept after all… Was it just the hobby-horse of large integration-happy stakeholders? I’ve always been sort of confused by the concept of the Service Catalog – so much so I’ve posted about it before to get a feel for public consensus. For those who don’t know what service catalog was – here’s a great…
+ + tl;dr - Slonik is my go-to Postgres driver for recent projects (mostly SvelteKit-based) – it is amazingly lightweight, simple and powerful. I prefer it even though it lacks time-saving ORM methods (ex. Model.save()). UPDATE (2023/05/09) As much as I loved using Slonik due to how lightweight it is, it just isn't a reasonable choice when compared with something like TypeORM. With issues…
UPDATE (2022/06/30) After some feedback from HN I also have an audio sample if you want to hear it! (Turn the sound down a little! There's also a bunch of dead air after 15 seconds.) Your browser does not support the audio tag. tl;dr - Don’t chuck the Sony 1000XMs/AirPods just yet. Bluetooth headsets are more convenient, can have better mic quality, and none of the downsides. That said,…
tl;dr - Large components of systems you build deserve an interface, even if there is only ever one implementation. If you want your code to be good, put a bird interface on it! I’ve gone back and forth, but for the last maybe 5 years my opinion has hardened. My stance is now that it is unquestionably right to always build an interface for large components of a given system, even if you only…
tl;dr - I started a newsletter for ideas, and I love seeing subscribers with emails like someone+ideas@provider.com Last month I started a newsletter for unvalidated ideas. I know what you’re thinking – Execution is everything – aren’t ideas nearly worthless? Wouldn’t that make the newsletter worth zero or possibly less due to cost of reading? Well I don’t have…
tl;dr - If you haven’t heard of lstopo before, you’re welcome. While watching a recent ServeTheHome video on Youtube (I really should watch that channel more, they’ve been quality for an very long time), I noticed them mention a tool I’d never heard of before called lstopo. It was mentioned casually along wiht lscpu (which is very useful and well known) and it had an…
+ + tl;dr - I installed Loki and Fluent Bit on my Kubernetes cluster for some light log retention, in the past I’ve used EFKK but this setup is lighter and easier for low maintenance projects. Assuming you have a Grafana instance handy, Fluent Bit + Loki is pretty great for a low effort log aggregation! It’s a relatively “new” stack compared to options like Graylog. Another…
tl;dr - CSI is awesome but it doesn’t help you with cross-StorageClass data migration. I wrote a small, painfully procedural script & docker container called pvcloney to perform this task repeatably for myself. The code is a great crash-course to @kubernetes/client-node Today’s yak shave is of the storage variety – useful only to people who use/evaluate different storage…
tl;dr - cert-manager and moved from Bazel to Make (i.e. Makefile) based build in 1.8.0. I’m into Makefiles (+ kustomize) for builds and deploys so I’m taking an undeserved victory lap. A welcome surprise during a long round of updates Recently I’ve been upgrading some of the critical services in my cluster and like everyone else, cert-manager is one of the best parts of my…
UPDATE (2022/08/02) Looks like Svelte has a new mechanism for dealing with runtime/static env -- check out the docs on $env/dynamic/private I'll probably be using this method in my projects for a bit, but will be migrating towards the built-in solution! tl;dr - I use ENV in Sveltekit by loading .env/.envrc formatted files (thanks direnv!) and making sure to do filtering only for PUBLIC_* in…
tl;dr - We should call the market-validating pre-launch landing pages people make “prospecting pages”. Everyone says it, it sounds trite, but I had to figure it out for myself – 0-1 startups are many times market discovery vehicles. Smarter entrepreneurs enter existing markets and do something better than existing incumbents, but I think even that could be phrased as…
+ tl;dr - Host some Thunderbird autoconfig formatted XML, and text files at the right places (thanks to MTA-STS) so clients can have easy-peasy email setup. This was a fun chance to flex my Traefik installation, and kcup. You’re hosting your own email server right? Cool, me too. Good thing we ignored all the naysayers out there. In the past I’ve run postfix + dovecot setups and now I…
tl;dr - AGPL aligns creators, maintainers, tinkerers, and users of software while leaving avenues for monetization. AGPL isn’t actually anti-hosting (IANAL) but is instead a forced improvement repatriation scheme. Nimbus Web Services will host AGPL software and contribute back – hyperscalers can too. Read the fundamentals of the AGPLv3 and Why the affero GPL. UPDATE (2022/04/27) After…
tl;dr - stream-of-consciousness notes as I stumbled through upgrading a k0s cluster from single-node to HA control plane. You probably shouldn’t attempt to do this though, just make a new HA-from-day-one cluster and move your workloads over. Recently I went through the somewhat traumatic experience of upgrading a k0s Kubernetes cluster from a single master (I was running 1 controller+worker…
/ tl;dr - Line by line explanation of my ansible-powered ZFS install script for use on Hetzner’s dedicated hardware (Ubuntu 20.04 - “Focal”) – it’s not perfect/minimal, but it works for me. A while back I started using ZFS on all my bare metal dedicated hardware hosted at Hetzner to wrangle the attached HDDs and SSDs. There are lots of choices in the space (standard…
+ tl;dr - This post explains how I built LoginWithHN.com (LWHN), an unofficial OAuth2+OpenID connect provider for HackerNews. LWHN is for builders who want to share things with the HN audience, and cuts down friction like any other OAuth2+OpenID connect provider. LWHN is now open to the public for new client app registration, so check it out if you’re interested. DISCLAIMER: I wrote this…
+ tl;dr - Ceph (Bluestore) (via Rook) on top of ZFS (ZFS on Linux) (via OpenEBS ZFS LocalPV) on top of Kubernetes. It’s as wasteful as it sounds – 200TPS on pgbench compared to ~1700TPS with lightly tuned ZFS and stock Postgres. The setup is at least usable and can get up to 1000TPS (2 replica ceph block pool) with synchronous_commit=off and some other less risky optimizations. Check…
- tl;dr - My cluster-wide prometheus scraping config was picking up port 25 as a good place to send GET /metrics requests, and broke my surprisingly fragile email setup (Haraka -> Maddy), simply by inundating it with invalid HTTP requests to a port meant for SMTP. My mailer setup makes use of two pretty good F/OSS tools that I rarely have problems with: Haraka Maddy They work great, and I…
+ UPDATE (2021/12/21) After lots of feedback on Reddit (thanks /u/BucketOfSpinningRust!) and doing some more experimenting and digging, I've updated this post with more information -- new/updated sections are marked "Update". tl;dr - Tips for running Postgres on (Open)ZFS-on-Linux (ZoL), which I’m nicknaming “PoZoL”, check out the TOC (or skip to the resource list at the bottom)…
tl;dr - Adding a rebuilt node with a different IP under an already-used node name did not sit well with Calico in my setup. I could see the problem (mismatched IP address information in Node resources), but I couldn’t fix it – ultimately I gave the new node a new never-before-used name (i.e.. worker-< n+1 > instead of worker-2). Recently during an expansion and some shifting of my k8s…
tl;dr - A drive attached to a Hetzner dedicated server failed, my drive has both mdraid and ZFS set up so I restored thanks to Hetzner documentation and Joyent’s nice high level docs on ZFS drive replacement combined with the OpenBSD Handbook’s section on ZFS and OpenZFS (ZFS On Linux) Docs. Recently I’ve undergone the pretty traumatic expansion of my Kubernetes control plane…
tl;dr - I used a self-hosted Baserow instance as the backend for a landing page announcing my most ambitious endeavor yet (a cloud provider called NimbusWS). UPDATE (11/25/2021) Baserow 1.7 has just been released!. Lots of big features in this new release, like Lookups (which look like a way to do JOINs) -- and someting I pontificated in this very post, webhooks! Building landing pages is fun, but…
+ + UPDATE (10/28/2021) I've gotten some great feedback from a post in r/kubernetes and another post in r/zfs. I've added a section with some thoughts tl;dr - I recently switched my baremetal cluster storage setup to OpenEBS ZFS LocalPV + Longhorn. Some issues with Longhorn not running on PVCs aside, the setup is flexible perf wise (ZFS LocalPV) and I at least have a low-complexity option for…
tl;dr - Haskell’s worth checking out if you haven’t yet, you’ll find some features you may want to bring back to your beloved $LANGUAGE. Rah-Rah Haskell posts in 2021? You betcha. Note that all examples are written in simple Haskell where possible. No eta reductions for example, the code should be very easy to understand. Most of the code in here will sail past the compiler (you…
While growing my Kubernetes cluster and working on some Ansible scripts for my infrastructure I recently realized that I’ve been under-utilizing one of the staples of ansible code, tying node-specific information to nodes in the inventory file! It was harder than I thought to use so this a quick writeup on how to do it: Given an inventory file like this: all: children:…
+ tl;dr - If you didn’t know how to set up a SystemD timer and service to backup your k0s cluster, you no longer have an excuse, scroll down for the code Recently while going through my workloads and making sure everything’s backed up to external storage (I’m using BackBlaze B2) and it’s been great so far). I came across the problem of how I should back up the cluster…
+ + tl;dr - You’re going to want to use a Hetzner-external resolver (1.1.1.1/8.8.8.8/9.9.9.9) if you’re going to attempt to resolve your own server’s address(es) from your own server. This is a variation of an issue that has already been discussed some on reddit, but it’s not about Hetzner DNS being down but more about recursive queries not working (and finding this via…