RSSAmplifier

Blog

Elric rambles

Recent content on Elric rambles

blog.melnib.oneRSS feed ↗20 posts

Latest posts

AwesomeWM on Fedora 43

It’s been a few years since I last wrote about getting AwesomeWM to work on a new machine. But since I just got a new machine, I had to jump through a few hoops again. Hopefully this little post can help the next poor sod out. 
 I started from the Fedora i3 Spin , which seemed like the most lightweight X11-based Fedora Spin. I dnf installed the awesome package, restored my rc.lua…

My "at" scripts

There was an interesting discussion on HN about personal scripts . Lots of fun tidbits! My comment about my “at scripts” was quite well received, and people seem to find this useful every time I bring it up, so I figured the topic probably deserved its own blog post. 
 At what? 
 “At scripts” ( @scripts ) are what I call the rather large and motley collection of…

Remove @Generated annotations when using the OpenAPI client generator

The OpenAPI Generator can generate a Java client based on an OpenAPI spec. Super useful for integrating with any sort of REST(-ish) API. I typically check in the generated client, in part because generation can take a while, but also because I like being able to track changes in the generated code. 
 Unfortunately, the generated code contains some unnecessarily verbose metadata, which make it…

Encrypted storage with CryFS

Secure file storage is something that’s high up on my list of priorities. All my data is encrypted at rest, mostly using LUKS. Some of my data, however, is synced to various devices using remote file systems (think Nextcloud or Dropbox). I enjoy having a bit of security on top of those services, because I don’t always trust where the data is stored. 
 For many years, I accomplished…

Poor man's HAProxy SSL debugging

I spent way too much time debugging a hairy reverse proxy connectivity issue. Turned out a misconfiguration on my part resulted in the wrong certificate being presented by default. This was very much non-obvious, because there were multiple proxies in a row, and only one of them was under my control. 
 Being able to log which certificate HAProxy was presenting was very helpful. It took more…

AwesomeWM on Fedora 41

X11 (Xorg) continues its slow death march in favour of the newer Wayland. My window manager of choice, AwesomeWM , only runs on X11. I’ve been using it since ~2008, and I hate pointless change. Every time I get a new laptop or upgrade an OS, the chance of it no longer working increases. 
 Installing AwesomeWM on Fedora 41 was as simple as ever, just install the awesome package.…

InheritableThreadLocal and Bugs

I was at Devoxx last week, where I enjoyed several talks about the new and upcoming Concurrency features in Java. Maybe I’ll do an overview of those in a future post, but if I’m being honest, they’re already pretty well described elsewhere. 
 In one of the talks, the speaker mentioned the venerable InheritableThreadLocal , which reminded me of an interesting bug I’d…

Death of the User Agent

Once upon a time, web browsers were known as User Agents. The idea presumably being that they are what enables the user to interact with the web. The term “browser” never sat right with me. It turns active agency into passive browsing. Might as well rename the smartphone to scroller .

Grokking Simplicity, part 1

I was recently reminded of Manning’s Grokking series in a discussion on Hacker News. So I figured I’d pick up a copy of Grokking Simplicity, by Eric Normand. The name frustratingly hides the fact that it’s about Functional Programming. I took a bunch of notes while reading it, and I figured I’d clean them up a bit and publish them as a blog post. 
 This was a pretty…

Loving Obsidian with Excalidraw

I’ve been a note-taker for a long time. It all started with a research journal at work, using pen and paper. As time progressed, I tried various tools and digital approaches, from plain text notes in vim to tools like Zettlr and Joplin. 
 Eventually, I settled on Obsidian. At its core it’s a nicely polished markdown editor on steroids. One of the things that sets it apart from…

An ActiveMQ gotcha

Spent way too much time hunting down a strange ActiveMQ issue recently. Finding the cause was complicated by several factors: 
 
 The ActiveMQ servers are managed by an external party 
 Our application runs on Kubernetes, also managed by an external party 
 The problem only occurred on an environment that’s in use by a customer, not in any of our test environments or during…

Introducing RSSDown

I’m an avid user of Markdown related tools. This blog is written in Markdown. My notes are in Markdown (using Obsidian ). I often archive web pages as Markdown. The benefits are many: it’s plain text, easily searchable, easy to read on any kind of device, there’s great tooling out there, and it’s flexible enough to fit most needs. 
 It is for these reasons that I spent…

In praise of modern infra tooling

I’ve been managing servers in one capacity or another since 1999 or so. A lot has changed since then. Many changes have been gradual improvements. Hardware slowly got cheaper, colo slowly got cheaper, bandwidth got a lot cheaper really quickly, partially managed servers and VPSes have become dirt cheap. 
 With all those improvements on the hardware side of infra, it’s easy to…

Apache HTTPD and LDAP attributes

More fun with Apache HTTPD. This time I wanted to access a user’s email address and user id, both stored in LDAP, in an application without LDAP integration. Thankfully, this turned out to be pretty easy. But first, some background. 
 The application is a very simple Java application, which sits behind HTTPD as a Reverse Proxy. The Reverse Proxy handles authentication, because reinveting…

On names

Trust no one 
 Input validation has been something of an obsession of mine ever since I picked up PHP back in the 90s. You can never trust user input. At all. To give an example, back when contact forms (without CAPTCHAs) were a thing that existed, many of them were abused to send spam to random people. How? By abusing naïve input validation in combination with PHP’s extremely shitty…

Please accept Accept-Language

A bit of backstory … 
 Living in Belgium can have pretty interesting consequences. The puny country has 3 official languages (Dutch, French & German). Many more languages are spoken, of course, this is the 21st century and there are people of every possible origin here, and most countries are pretty similar in that regard. What’s less common is Belgium’s language divide. The…

Search

About

Who Elric, software engineer, geek, lover of tea. Should probably add some more foo to this site.
— Elric

Protecting credentials from untrusted applications with HTTPD

Why? 
 Sometimes you just want to deploy a tool and protect it from unauthorized access. This is easy if the tool comes with built-in access control. Especially if there’s support for LDAP authentication or SAML. But sometimes, that’s just not the case. In which case you can just Apache HTTPD’s built-in mod_auth to enforce authentication with Basic Authentication. This works…

On pointless Java 8 embellishments, or an exercise in simplicity

While performing a code review, I stumbled upon this little gem. Pasted verbatim, with the exception of the name of the first function. 
 Long num = someFunctionThatNeverReturnsNull (); 
 if ( Optional . ofNullable ( num ). orElse ( 0l ) > 0 ) { 
 // ... 
 } 
 The salient part, of course, is the if-statement. It’s rare to come across a single line with so many layers of…