RSSAmplifier

Blog

VADOSWARE

Recent content on VADOSWARE

vadosware.ioRSS feed ↗267 posts

Latest posts

Stop Using Merge Commits

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…

Fixing Pinentry With Emacs

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,…

Yet Another IPC in Rust Experiment

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…

From Zellij to Tmux Back to Zellij

/ 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,…

Starting locally installed Postgres instances in 2024

TL;DR This post exists because I forgot how to start locally installed Postgres before a talk. I don&rsquo;t normally have a section like this, but since I&rsquo;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…

Getting Features to Show Up in Your Rust Docs

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&rsquo;t want all features to be enabled (if you want some features and related code to be…

A Year Hiatus with Rust and Webassembly

+ tl;dr - I did the thing where authors disappear for year(s) due to $DAYJOB &ndash; I&rsquo;ve been working with Rust and WebAssembly. I&rsquo;m going to try to write a bit more! I&rsquo;m not back but it has occurred to me that this blog hasn&rsquo;t seen any content in a whole year (and a day). Sorry about that &ndash; I&rsquo;ve been busy working at $DAYJOB, and have been doing a lot of Rust…

Building Custom Kernels for Kata Containers

+ 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&rsquo;s way easier than it seems, though the docs are a bit stale/don&rsquo;t work as expected. Generally there are a few reasons you might want to do this, but…

Fixing GPGME Error on Arch

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…

Makefile Tips: help text and preambles

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…

Software Sessions: Yak-shaving interview (2022)

tl;dr - I hopped on the Software Sessions podcast to talk about yak shaving and some projects I&rsquo;ve been working on. Take a Listen (it&rsquo;s kinda long so consider the transcript as well) I was contacted a while ago by Jeremy who runs the Software Sessions podcast. I&rsquo;d actually come across his Podcast in the past so I was super excited to get a chance to interview and talk about some…

Faster CI builds for Rust with pre-baked builder images and sccache

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&rsquo;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&rsquo;t have ported this particular project to Rust (Nimbus is…

PSA: Email Submission should be on port 465

tl;dr - Your program should support 465 and optionally 587 &ndash; implicit TLS via submissions over port 465 is where we&rsquo;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…

Tooling spotlight: direnv

tl;dr - You should be using direnv to load ENV variables dynamically per-project. You don&rsquo;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&rsquo;s just a CONFIG ENV var that points to a config.toml that your application reads, passing configuration via environment variables is…

PSA: Getting __dirname and Package Information with ES Modules

tl;dr - __dirname and package information are a bit harder to get from an ES module. In case you&rsquo;re not using them yet, take a second to read up on Javascript (&ldquo;ES&rdquo; &ndash; EMCAScript) modules &ndash; they&rsquo;re quite the large feature/platform change, big steps up (mostly) from CommonJS and RequireJS (AMD). One of the things that isn&rsquo;t quite as nice as RequireJS in…

Introducing the Awesome F/OSS Newsletter

tl;dr - I started a newsletter called Awesome F/OSS &ndash; I&rsquo;m featuring one awesome Free and Open Source project every day for the next&hellip; forever(?). I&rsquo;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&rsquo;s felt like only being able to…

The Preamble to Crypto might have just ended

tl;dr - Crypto does have a few usecases, ETH2&rsquo;s switch to Proof of Stake means it&rsquo;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&rsquo;m going to try and front load as much of my thesis as possible, as plainly as possible. You do not…

TIL: How to Import or Open .ics Files in the Calendar App (iOS)

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 &ndash; invite.ics/calendar.ics? Well for some reason they don&rsquo;t open right on iOS. iOS will let you review the details of the event, but won&rsquo;t let you add it to your…

Remember the Firefox Phone?

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 😢

App Runner finally works on Apex domains

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:…

Introducing pg_idkit: A Postgres extension for generating UUIDs

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…

Self-Hosted email is the hardest it&#39;s ever been, but also the easiest.

tl;dr - This post was inspired by Carlos Fenollosa&rsquo;s post (and the resulting discussion on HN). Self hosting email is the easiest it&rsquo;s ever been &ndash; don&rsquo;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 &ldquo;After…

Even Amazon SES Has IPs blocked by Spamhaus sometimes

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 &ndash; I don&rsquo;t know what automated system…

Was Service Catalog Redundant After All?

tl;dr - Service Catalog might ahve been a redundant concept after all&hellip; Was it just the hobby-horse of large integration-happy stakeholders? I&rsquo;ve always been sort of confused by the concept of the Service Catalog &ndash; so much so I&rsquo;ve posted about it before to get a feel for public consensus. For those who don&rsquo;t know what service catalog was &ndash; here&rsquo;s a great…

Slonik is Awesome

+ + tl;dr - Slonik is my go-to Postgres driver for recent projects (mostly SvelteKit-based) &ndash; 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…

Why don&#39;t more people use Throat Mics?

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&rsquo;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,…

Building an interface (even if there&#39;s only one implementation) is unquestionably right

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&rsquo;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…

Learning to Love the Plus Addresses

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&rsquo;re thinking &ndash; Execution is everything &ndash; aren&rsquo;t ideas nearly worthless? Wouldn&rsquo;t that make the newsletter worth zero or possibly less due to cost of reading? Well I don&rsquo;t have…

Cool CLI: lstopo

tl;dr - If you haven&rsquo;t heard of lstopo before, you&rsquo;re welcome. While watching a recent ServeTheHome video on Youtube (I really should watch that channel more, they&rsquo;ve been quality for an very long time), I noticed them mention a tool I&rsquo;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…

Installing Fluent Bit and Loki for lightweight logs

+ + tl;dr - I installed Loki and Fluent Bit on my Kubernetes cluster for some light log retention, in the past I&rsquo;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&rsquo;s a relatively &ldquo;new&rdquo; stack compared to options like Graylog. Another…

A script for copying PVC data across StorageClassses

tl;dr - CSI is awesome but it doesn&rsquo;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&rsquo;s yak shave is of the storage variety &ndash; useful only to people who use/evaluate different storage…

cert-manager moved from Bazel to Make

tl;dr - cert-manager and moved from Bazel to Make (i.e. Makefile) based build in 1.8.0. I&rsquo;m into Makefiles (+ kustomize) for builds and deploys so I&rsquo;m taking an undeserved victory lap. A welcome surprise during a long round of updates Recently I&rsquo;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…

A Pattern for ENV in Sveltekit

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…

Lets call pre-launch market-validation pages &#39;prospecting&#39; pages

tl;dr - We should call the market-validating pre-launch landing pages people make &ldquo;prospecting pages&rdquo;. Everyone says it, it sounds trite, but I had to figure it out for myself &ndash; 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…

Thunderbird Autoconfig for your self-hosted email server with MTA-STS

+ 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&rsquo;re hosting your own email server right? Cool, me too. Good thing we ignored all the naysayers out there. In the past I&rsquo;ve run postfix + dovecot setups and now I…

The Future of Free and Open Source is AGPL

tl;dr - AGPL aligns creators, maintainers, tinkerers, and users of software while leaving avenues for monetization. AGPL isn&rsquo;t actually anti-hosting (IANAL) but is instead a forced improvement repatriation scheme. Nimbus Web Services will host AGPL software and contribute back &ndash; hyperscalers can too. Read the fundamentals of the AGPLv3 and Why the affero GPL. UPDATE (2022/04/27) After…

Upgrading a k0s cluster in-place from single-master to HA

tl;dr - stream-of-consciousness notes as I stumbled through upgrading a k0s cluster from single-node to HA control plane. You probably shouldn&rsquo;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…

How to Install newer versions and bleeding edge ZFS

/ tl;dr - Line by line explanation of my ansible-powered ZFS install script for use on Hetzner&rsquo;s dedicated hardware (Ubuntu 20.04 - &ldquo;Focal&rdquo;) &ndash; it&rsquo;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…

How I Built LoginWithHN

+ 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&rsquo;re interested. DISCLAIMER: I wrote this…

Starting 2022 with a Bang: Ceph on ZFS

+ tl;dr - Ceph (Bluestore) (via Rook) on top of ZFS (ZFS on Linux) (via OpenEBS ZFS LocalPV) on top of Kubernetes. It&rsquo;s as wasteful as it sounds &ndash; 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…

Infra Fun: Prometheus Broke My Haraka Installation

- 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…

Everything I&#39;ve seen on optimizing Postgres on ZFS

+ 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&rsquo;m nicknaming &ldquo;PoZoL&rdquo;, check out the TOC (or skip to the resource list at the bottom)…

New node who dis? DNS Issues and Calico Failures on a resurrected Node

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&rsquo;t fix it &ndash; 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…

Handling your first dead Hetzner hard drive

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&rsquo;s nice high level docs on ZFS drive replacement combined with the OpenBSD Handbook&rsquo;s section on ZFS and OpenZFS (ZFS On Linux) Docs. Recently I&rsquo;ve undergone the pretty traumatic expansion of my Kubernetes control plane…

Using Baserow to power the landing page for NimbusWS

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…

Bare metal k8s storage: OpenEBS ZFS LocalPV &#43; Rancher Longhorn

+ + 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…

How and why Haskell is better (than your favorite $LANGUAGE)

tl;dr - Haskell&rsquo;s worth checking out if you haven&rsquo;t yet, you&rsquo;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…

Ansible tip: Variables from inventory file

While growing my Kubernetes cluster and working on some Ansible scripts for my infrastructure I recently realized that I&rsquo;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:…

Automating k0s cluster backup with Ansible and SystemD

+ tl;dr - If you didn&rsquo;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&rsquo;s backed up to external storage (I&rsquo;m using BackBlaze B2) and it&rsquo;s been great so far). I came across the problem of how I should back up the cluster…

Sometimes the problem is DNS (on Hetzner)

+ + tl;dr - You&rsquo;re going to want to use a Hetzner-external resolver (1.1.1.1/8.8.8.8/9.9.9.9) if you&rsquo;re going to attempt to resolve your own server&rsquo;s address(es) from your own server. This is a variation of an issue that has already been discussed some on reddit, but it&rsquo;s not about Hetzner DNS being down but more about recursive queries not working (and finding this via…