More blog tinkering…
Fooling around with the templates, I set about fixing some indentation issues. It’s a long-standing annoyance of mine that Hugo’s markdown to HTML renderer throws away all indentation - I’m pretty sure you can fix it with something like:
{{ .Content | strings.ReplaceRE `[\r\n]` "\n " | safeHTML }}
… however I wasn’t really happy with the results of this, so I elected to just wrap it in some HTML comments and be done with it. HTML comments are themselves ignored by Hugo’s templating engine for some reason, this was my solution:
{{ printf "<!-- this is a comment -->" | safeHTML }}
But for some reason, it was not happy with this inside the inline <script>
tag? After quite a bit of experimentation, I finally Googled it… to learn that apparently HTML comments around inline Javascript hasn’t been necessary in like 20 years or some shit, and Hugo was actually Doing The Right Thing. Bah!
Anyway, I cleaned up a bunch of the indentation, threw away some more classes I didn’t need, and it’s actually not looking too bad right now. Did I do anything about the contrast ratio of light mode text? No, no I did not.
Oh, I also learned that SRI is useless for inline script elements, so I removed that. I’m sure some security scanner or another told me I needed it, but we’ll see. It seems to be fairly happy without it, in Firefox at least.
Update - 2025-08-14: I figured out a hackish way of making the main text black, and I put a black stroke around the logo for now so it’s visible. I also added some CSS which will make the top and bottom navigation links just icons if you’re on a mobile or really small screen, which stops it form having sideways scrolling for no damn reason.
I think that’s it most of the way “good enough” - I am of course itching to redo a theme from scratch because I’m starting to hate this one, but for now it’s definitely good enough.
PicoCSS - merged
Quite some time ago, I looked at switching from Bootstrap to PicoCSS, but I didn’t end up going through with it. I don’t remember all the problems that I had, but I managed to, while not having any internet this weekend, solve a couple of them.
Getting rid of the dark backgrounds on the syntax-highlighted code blocks was easy enough, I just had to add this to my config:
pygmentsUseClasses: true
This has, of course, left me without syntax highlighting at all, as it just sets the classes and then expects CSS to actually pick the colours, and I do not have any CSS set up for that. But I’m actually okay with that, the defaults are mostly readable, and I can pick colours later on… I just need to find a theme (or potentially hack one together) which supports auto light/dark mode and remains readable on both. Easy, but a task for another day.
The only other thing I can think of that’s bothering me is the header image doesn’t really work properly for light mode… but I think I can fix that later when I get around to it.
In order to fully benefit from it, I need to subset font-awesome, since I only use about seven of the glyphs I don’t need all 180KB of it. I could have them do this, but looking into it, they want $150/yr for the ability to do that… that’s a tough sell for someone like me with no design intentions. In fact I’m starting to wonder whether a PNG of sprites mightn’t be a better solution, abandoning font-awesome completely? Heck even if I did separate PNGs it’s still going to come in at less load time on a very slow link, I think - at the cost of losing perfect scaling. SVGs?
For now, I don’t know if I care enough. I’m still sub-megabyte first page load if there’s no images on the front page - around 500KB, and approximately 250KB or so of that is font-awesome.
I think the first order of business is to sort out improving the contrast of the light-mode text, and any other associated annoyances with it.
No internet!
Woke up this morning to my phone being connected solely via its 5G connection, rather than our wifi. That’s weird. Also wireguard is down - doubly weird. Out of bed, and Sabriena goes “I think the internet is down” - yes it sure seems that way.
I look at the NTD, and there’s no optical light on it. I then remembered that we were supposed to have maintenance last night, so I checked and the window was from midnight to 6am, and given that it was about quarter past seven at this point, clearly something had gone very wrong.
Looking at the guides, I power cycled our router - even though it was clear it wouldn’t do any good. I then waited until 8 to call up tech support, where they informed me that yes, it was fine and probably even a good idea to power-cycle the NTD as well. Still no improvement, and at this point the tech asked me to confirm the sequence of lights: yes, power status light is green most of the time, the optical status light is dark, and the power status light periodically goes flashing which suggests it’s starting up. We did try a reset of the NTD, by holding the tiny reset button in with a paper clip.
No good, they’ll have to ask NBN to come out and check out the NTD, and the earliest appointment is Monday. We don’t have any confirmation or anything, but the speculation is:
- the rather lengthy maintenance window was them rolling out software patches for the optic hardware to support the forthcoming 2-gigabit connections they’ll offer.
- it seems quite likely that the software update was botched on our NTD, and it’s boot-looping as it reaches the point where it tries to enable the optical hardware.
Anyway, once I picked myself up out of the fetal position, I started thinking about what I’d do for work. I’d already tethered my phone to my work laptop which would get me through today. I looked to see if we could get a proper modem in town that would do 4g or 5g as a backup - I can, but at $250AUD I’m not sure I want to… our connection is generally fairly reliable and I can use my wireless hotspot for work.
Then around my lunch break I remembered that I have a very old TP-link WAP that can be configured as a wireless->ethernet bridge. I can turn off it’s WLAN, bridge it to my phone’s hotspot, and have everything on the network have access to the internet!
This worked, but with a few issues: first, the device is grossly out of date. It’ll get me through the weekend, but it’s not a permanent backup solution (entirely unsuitable for work). Second, it’ll be slow - for some defintion of slow. Third, there’s the possibility I’ll chew up all the saved up transfer quota on my mobile account doing this - I have 215GB free… but we’ve only used 400-ish for this month (8 days) so it seems quite likely that if we limited our downloads we could get through the weekend using up our phones after all.
The final issue would be I can’t have my phone in my pocket or near me, so I decided I would not set it up until after the work day was finished.
Update 2025-08-08: I set it up, it works, but keeps dropping off. I then tried Duncan’s iPhone, on the assumption that if we eat up his quota instead, it won’t matter as he never uses his phone. He approved this idea because I told him he can watch YouTube if he wishes - it’s his quota. Interestingly, his ancient iPhone XR performs much better, staying connected pretty much the entire time until it shuts off the hotspot after 8 hours or so? He did mention that the couple of Roblox games he tried were unplayable, but I did manage to stay connected to GTA Online without too much issues.
Also it’s interesting to note how well Mastodon handles sporadic connections. When we’re connected and the tailscale tunnel I set up for inbound connections (due to the fact that our mobile connections are CGNAT, so I can’t open an incoming port, much less 443) comes up, it immediately starts picking up new posts, sending the old ones, etc. The sidekiq queue on my end flushes out fairly quickly, maybe 45 minutes? I’m not sure what it looks like from another admin’s perspective, with my server throwing 502s for every request that isn’t in the cache, but I’m impressed.
Update 2025-08-11: Our technical visit window was from 8am til noon, so I skipped lunch and didn’t walk the dog today. Unfortunately, I got the SMS that the tech was on their way about 10 minutes before noon, and then a phone call shortly thereafter - he was busy helping someone out who had a medical connection, but he’d be there when he could, would I be around later? Sure, as much as I might rock back and forth and chant at the prospect of going additional days without a decent internet connection, someone with a “medical” connection likely has far greater needs than mine.
He finally made it out at about 4:30, and the visit was very quick. He brought in a tester to check the optical connection, disappeared out to his truck, grabbed another NTD, replaced it, put some numbers into the app on his phone, told us he’d wait into the driveway until it synced but if he drove off it’d be fine. He drove off, so I plugged the UDM-SE back in and we have internet again.
At one point he asked if I could throw the old NTD away for him, and I said sure… I was already thinking about taking it apart! Alas, he took it with him, so I don’t get to see what’s in them.
Beanie: Broken tooth!
Last week sometime, we noticed off-hand that Tiabeanie was “flicking” her head occasionally… like not quite a shake, but the start of that movement. This usually, in our extremely limited experience, indicates some sort of trouble, often an ear infection, so we decided to keep an eye on it and make a vet appointment if it didn’t go away or got any worse.
Then on Friday, when brushing the dog’s teeth, Sabriena noticed her pull back sharply and there was a small amount of blood on the brush. Tried again Saturday, and she didn’t want to know about it. We tried to have a look for any obvious wounds or blood and didn’t see any, but we don’t entirely know what we’re looking for and she’s - rightfully - not too cooperative for us to have a good long look.
So first thing Monday, I made an appointment, which was today. In to the vets - where she spent a bit of time as a puppy due to being fostered there, so she loves it - and it took the vet all of half a second to notice she’d broken a tooth.
How? We have no idea. She likes to chew sticks, but I don’t think that would do it. She also enjoys a small piece of beef trachea for dessert most nights, but I wouldn’t think that would be hard enough either.
In any case, unless we want to drive her all the way down to Melbourne to see a specialist, the tooth has to come out, so we booked that in as soon as we can. Hopefully it’s not the start of bigger issues.
Pupdate: 2025-08-14: She had her surgery today, we picked her up at about 5:30. Everything went well, just the one tooth to come out, her teeth aren’t perfect but overall look pretty good. The usual surgery recovery (though at least this time the only thing cut open was her mouth so her bed-rest period won’t be so long) and she goes back in about 10 days for a check-up.
New home game server!
A while back I watched a YouTube video on setting up a game server using AMP. It’s commercial software, but the youtuber (which one it was escapes me, and I don’t feel like sifting through my YT history) hit on exactly my problem with the FOSS ones - you can either pay a little bit of money, or you can pay in hours fucking about. Every time I’ve tried the several different FOSS game server panels, I’ve ended up throwing them in the bin and spinning up my own Docker containers.
But my goal in this one is to get Duncan and Sabriena to use it, as the process is such a pain in the arse that they pretty much just rent a Minecraft server for a month when they want to play (it’s never more than a month). Given the cost of the license for AMP, one month of a decently sized server would pay for it easily.
So I bought the license, then set it up on a little Ryzen 1200 box we had spare. The results weren’t great, the server just wasn’t really strong enough. Enter: the parts left over from upgrading Sabriena’s machine.
I stole the RAM out the Ryzen machine, put it in this one, which pushed it to 32GB. For single-core performance the 7700k overclocked to a modest 4.8GHz will eat the Ryzen 1200 alive (probably a good 50% faster, not counting the overclock and any first-gen Ryzen fuckery) and it’ll idle-down to lower power consumption as well I think.
The results? No idea yet, they haven’t played Minecraft since. I’ve spun up a few things myself temporarily though, like a Satisfactory server, and a Valheim server, and haven’t really had any complaints. I did have issues with the Ryzen server apparently locking up with AMP installed, I’ve had no such issues with the Intel one.