Madeline's Blog

Wonder what she's doing...

Mastodon Poetry Photography RSS

The Art Of The Bodge: Using OpenBSD's httpd, slowcgi, hotplugd

2026-07-09

I've recently become interested in photography after picking up a $20 camera from an op-shop in town. I've got two cameras that I really use; one for some weird circuit-bending stuff, and one regular camera for 'normal' photography.

Both of these cameras use SD cards which can make getting at the images on them a bit of a pain. I either have to get out a laptop, or hope my phone's USB port decides to co-operate with me. This is fine if I'm looking to get all the images off of a camera anyway, and I do have scripts set up to automate the process, but I still wanted a faster solution for just getting at one or two pictures with minimal readers, devices, etc.

So for my next trick, watch on in awe as I bodge together a solution to this problem using only things in the OpenBSD base system.

This isn't going to be a tutorial but rather a thousand-foot overview of what I've done, with some dotfiles sprinkled throughout.

Git Repository Management Script

2026-07-02

Scripts aren't so bad... right?

Since shutting down my git server I've been wanting somewhere new to store my code. I have been using CVS for a short time but have found it overall a little more clunky than git (though it's likely just my familiarity with git).

This post goes over how I wrote a relatively simple script called repositories.sh to manage the Git repositories on my home server.

We'll also take a look at some of the issues I hit with shared repositories and how I converted my CVS-managed projects into Git repositories.

Chroot 'em? I Hardly Know 'em!

2026-06-11

Probs shouldn't be running ffmpeg as root...

Recently, I've switched some of my home lab over to OpenBSD, a more traditional UNIX-like system focused on security. At around the same time, I became interested in hosting my own security camera setup using some spare webcams and an RPi 3B+.

This post goes over my ffmpeg script, including an overview of how one might automate chroot creation on OpenBSD.

I Cam't Sbell

2026-02-04

Let's make the computer do it for me

source code

I do a lot of writing on the command line; notes, blog posts, recipes, and a few other things. Because of this, I find myself using the same text editor (helix) for everything.

In the past, I've relied on running aspell check. While Aspell is a fantastic piece of software, I do have one issue with aspell check....

remembering to run it.

You know what I can't forget to run though? My text editor. Because of this, I'd like to take a crack at implementing a language server that wraps the pipe interface of Aspell.

This is a actually a partially incomplete post I found when I went to move my site to OpenBSD. I've left it here with the code just in case anyone might find it useful.

(RSS) Feed the Beast

2026-02-04

git commit -m "Rewrite project in Rust."

source code

Oops, I seem to have slipped, fallen, and accidentally used the Rocket web framework in combination with the maddi-templating crate to rewrite my personal blog (this blog) in Rust.

mustache and markdown-rs do some of the heavy lifting, and we've leveraged maddi-templating to add an RSS feed along the way.

Traiting Harder

2026-02-01

Generating Trait impls with an Attribute Macro

#[template("post.html")]

Writing a crate that implements the trait described in the previous post and supplies a macro to make implementing that trait easier.

We'll make use of the syn and quote crates to write our macro, and deconstruct all the different parts of the macro so you can see how it works.

I Trait My Best, I Swear

2026-01-28

For web servers, my go-to framework for Rust has been Rocket, and my favourite templating library has been the mustache crate.

This post covers some interesting things I discovered when trying to write a helper trait for my projects.

Better Understanding HTMX by Building a Video Player

2026-01-27

I've been playing around with htmx in combination with Rust's Rocket for a while in some simple self-hosted projects. Recently however I realized that I still felt clumsy when implementing certain models and behaviours using htmx. Because so many people rave about the simplicity and expressiveness of htmx, I figured it was about time that I knuckle down and learn how to use htmx 'properly'.

To that end, I decided to implement a video player that progresses to the next video automatically.

An Erlang, A Cowboy, and A Mustache Walk Into A Bar

2025-12-18

Having just arrived at the ACT airport at 10:30AM for my flight at 6:30PM, I decided to try out another programming language. This time it's Erlang.

Given my current fascination with htmx, I though it a good idea to see if I could get a basic cowboy web server working with some HTML templating engine. We won't look at using htmx here but as templating is important for it, it seemed interesting enough to motivate me to learn Erlang

Soranoba's mustache library called bbmustache seemed the most approachable.

Code for this project can be found here.

The Bad Program I Use Everyday

2025-12-15

I edit a lot of code on the command line and as such find myself using the ESC and LEFTCTRL keys more than most. Because of this, I wrote a piece of software called key-remapper for remapping keys using evdev and uinput.

The problem is, it doesn't work. Well it does, but for some reason when my laptop starts up, none of my keys work until I hit enter.

Let's fix that.

First Go Project: HTMX Blog

2025-12-13

Source for this project can be found here

fmt.Println("Hello, HTMX!")

A very basic implementation of a markdown-based blog using htmx backed by Go.