Write Only Log for July 2025 - osric.uk

I want a webhook to trigger a command, without giving the webserver auth to do, well, anything.

Solution: create a ssh keypair, add the public key to the target account authorized keys with exactly the permitted command, and then have the webhook trigger a ssh connect to request the task is fun.

Only the person who holds the ssh private key can trigger the command, and the person holding the private key can only trigger the command. Ideal.

(Implementation note: get the webhook recevier app to create and store the ssh keys, and to show a "copy this into your authorised keys" box somewhere)

Back from watching the new Superman (2025) movie in town, that was a giggle!

I enjoyed the movie. Specifically it had a couple of interesting fight scenes; both were in the background to some degree, one completely (with a Lois/Clark conversation in the foreground), and the other partially, with the main focus on Lois' reaction to the super powered fight happening around her.

There were a few good jokes, not too much hetro propaganda, good music picks (and clever use of music to highlight scenes).

The movie loses a point because I didn't like the portrail of the Kents. I'm used to The Lois and Clark adventures where Martha (especially) and John (somewhat) are both thoughrouly practical people who can take whatever life gives them and come out stronger. The Kents in the movie felt delicate and vounerable (which, I guess next to Clark they are) in a way that felt deeply unsafisfying.

I'm also not sure about the casting for Superman himself. The actor made a good Clark, but Superman felt soft (but Henry Cavel is a hard act to follow).

Taking about casting, Lex Luthor was excelently creepy, nailed the role, and Nathan Fillian was an inspired choice for Guy Gardener (Green Lantern, who is canonically unlikable).

Overall a good movie. Standard "going to the movies" problems (can't pause to go to the loo, can't mute the adverts, can't get proper comfy in the seat) plus the car park under the cinima had opressivly low ceilings and cost £5 for 2-3 hours.

Hello, by the way, to husband. I've just sent you the link to here so please let me know if you get this far (or if you just skipped to the end).

Today's been a good day. Did a bit of sleeping, did a bit of reading (Murderbot, again), did a bunch of programming, I even got out of the house (to pick up catfood).

I've picked up 3d graphics again (now that Firefox supports WebGPU)(at least on Windows so far, although I'm doing a lot of testing in Edge (at work) and in Chrome (on my Chromebook)). I'm working through [articles from a site called web gpu fundamentals] (https://webgpufundamentals.org/) and I'm (hopefully) about to get generated landscapes working.

My food diary app is working well, I've picked up a few weeks worth of data and so the next step with that is to do some analysis (although I'm willing to bet now that most of my points come from hifi bars). I might add weight measurements into it so I can compare points to weight (but husband's analysis of their data suggests no correlation between the two). I'm also thinking about how to handle "one off" foods - say I get a cookie tomorrow, I don't want a "cookie" button cluttering up the screen. Probably have a "visible on front page" toggle for foods, maybe driven by when I last ate something.

I'm still a bit chicken to actually start using the "deploy server changes automatically" system I've been building, but I think that's just paranoia. However, I'll have a think about how I can set up automated testing - at least smoke tests - either before deploy, or with automated rollback on test failure.

It's been a while since I've posted regularly, I have had trouble deciding if this is meant to be public or private (regardless of how many actual humans are reading this). However, choice made, it's a public blog, and so I'll (hopefully!) start posting again on that basis.

Frickin' time zones are broken for the blog as well! (The timezone for sunrise/sunset on the front page is also broken).

I'm do some digging in a bit to check what timezone the server thinks it's in (Rant: I really miss the setup I had in the early 00s where the site was perl cgi (maybe mod_perl, maybe not) and there was a page that loaded the cgi script into a textbox and saved the script back over itself, so I could make changes to the live site through the live site! It's much harder these days with compiled code and build pipelines and sensible levels of paranoia)

On the plus side I've finally put the duvet cover on the duvet (from when I wanted the cover a few months back).

Spent half the day writing a feature for source hut (so I can stash webhook urls as secrets), but I need to test it before I can submit it, and that's going to need a local source hut install, which I wanted to avoid.

But it's not going to be an overwhelming amount of work. I can spin up an Alpine VM, install the source hut packages from their repo and then install my patched package over the top.

(I guess I can even check that my feature is self hosting)

Still. I've been grumpy all afternoon. I should be able to just throw code at these people! Damn them and their entirely reasonable standards!

In other news I've seen, and liked, the first couple of episodes of Ironheart (2025), a Marvel TV show about a genius mechanic (who uses it to do crime rather than solve crime).

(Crap, energy crash. See you later blog)

OMG! I'm so awesome! Over at my WebGPU page I'm successfully rendering a generated landscape! (Or, at least, I am tonight, who knows what state it will be when you're reading this) (hello you!)

The landscape is basic diamond-square, and the rendering code is lightly adapted from WebGpu Fundementals (a very useful tutorial site that's pitched at exactly my level of understanding).

I'm using "build a game" as an excuse for all this 3D stuff, but I'm still not convinced. However, I'm going to roughly follow Trystan's Roguelike Tutorial, at least in terms of order of doing things and maybe rough mechanics.

That implies getting user input working (starting with keyboard, but I'd like to do mouse interaction too), and then the whole actors thing.

As far as graphics go, I'm going to look at Phong shading next, design some trees, update lighting, think about a sky box, overlay an html ui.

The code needs a bit of a tidy too. Right now, for obvious reasons, the graphics stuff is front and center. That needs be properly put into its own module (and maybe I should be thinking of 'components' and Entity Component Systems).

However. That's all later. Right now, whooop! It's working!

Given a triangle in 3d space ABC, we know it's normal is

n =(B-A)x(C-A)

We also know that a point r in the plane of the triangle satifies

n.(r - A) = 0

Since we know two of the coordinates of r, we can rearrange to calculate the missing third coordinate.

Expand the brackets

n.r - n.A = 0

Add n.A to both sides

n.r = n.A

Expand left hand dot product

nx*rx + ny*ry + nz*rz = n.A

And rearrange to get rz

nz*rz = n.A cm - nx*r - ny*ry

rz =  (n.A - nx*rx - ny*ry)/nz

To remember your current position in the blog, this page must store some data in this browser.

Are you OK with that?