For this year’s April Fools Day, I decided I wanted to replace some text in the content of my site’s pages to something funny, weird, or confusing. Since I’m moving toward a static site, I wanted to do this client side, which meant replacing text with JavaScript. This would be simple with innerHTML
, but that completely replaces the DOM with a new DOM, possibly causing usability and performance issues, and could replace text in URLs, breaking them. Probably a better way is to loop through all nodes on the page, looking for text nodes, and replace text in each of those. So I did this, and it worked nicely. Thought I’d share.
Toby's Log
This year, my larger redbud tree has only a few blooms on it and seemingly has gone straight to leaf. Last year, it fully bloomed and looked great. This year, it went to leaf right away while almost all the redbuds I’ve seen have bloomed nicely. It does seem to be growing faster this year than last: Must be focusing its energy on growth. So, hopefully next year it’ll be in full bloom again.
My tiny front sapling is still too small for blooms and has also gone straight to leaf. I’m glad it’s still doing fine.
ZSH regex capture groups
In writing a script for the ZSH shell, I wanted to extract some bits from a string. I looked for a regex solution, using capture groups. I could not figure out how to do it with sed
but I found that the [[ ]]
format of the test
command allows this with the =~
operator. If the test returns true, values are stored in a $match
array and can be accessed like $match[1]
and so on.
Finally got the One UI 7 / Android 15 update on my phone (Samsung S24) today. 15’s been out on Pixel devices for six months, but it took Samsung a long time with this one. I had bought this phone in part because Samsung is supposed to be quick with releases. Hopefully, this doesn’t become the norm.
Not a lot has changed noticeably. My most liked change is that I can have most app icons match my chosen accent color (green) which makes my home screen and quick app drawer look much nicer. There’s also a feature which separates the notification drawer and quick settings slide down, where swiping down from the left shows one and from the right, the other. I’m still getting used to that but may find it results in less swipes. There are a few other aesthetic tweaks. I think there’s a bunch of AI stuff, but I’m not that interested in that.
Using pipes to augment IO of command with bash script
I like the interactive mode of the bc
command line calculator because it is ubiquitous, but wanted to augment its functionality a bit to add a couple features I liked from another calculator program. I wanted to make modifications to the text I typed before sent to bc
and modify the text it outputted. This can be done on standard POSIX shells with mkfifo
, but it took me a good while to figure out how to do this with both input and output and get something working nicely without it freezing or leaving artifacts. So I’m sharing how to do this in a bash
script.
Doing my federal (US) taxes this year, I was finding myself unable to create an account on the Free Fillable Forms site. I kept getting kicked back to the start after filling out and submitting my information. This Reddit thread led me to figure out that it was related to my T-Mobile Home Internet. I turned that off and turned on my phone hotspot and used that to get in. My phone is also T-Mobile, but apparently different enough to not have that issue. Later, I was able to get back in with my Home Internet, so it seems to be just related to something on that initial registration process.
Server upgraded from Ubuntu 20.04 to 22.04
My server was on Ubuntu 20.04, but due to the end-of-life of that LTS version next month, I have upgraded to 22.04. My server is managed with Vagrant / Ansible. My plan had been to do a new local VM on the newer version, get it working properly with Ansible, then set up a new server with it and migrate over. However, since Ubuntu isn’t releasing an official Vagrant box for 24.04 and beyond, I don’t think it makes sense to take that path. I may move over to Debian or look into Vagrant alternatives, but to get this done before EOL, I decided to just try a do-release-upgrade
to upgrade the existing server in place.
Starting with Magento / React JS
My cousin expressed interest in learning Magento and React JS. I know neither, but I wrote up some related web development info that might be helpful for him. He would be working on a Windows machine. He also asked about setting up a home file server. Since this all might also be useful to someone else, I’m adding it here:
Here are some notes on web development stuff that you might find useful.
Continue reading post "Starting with Magento / React JS"Low oil
Last Monday, my car’s (Subaru Impreza) low oil light came on while I was driving down the highway. I didn’t know what the light was and nothing sounded wrong so I kept driving. When I got to my parents’, I looked up the symbol and then learned it was probably not a good idea for me to have kept going. Luckily, no harm seems to have been done.
Continue reading post "Low oil"In January, I made another of my cinnamon roll cheesecake’s. I was in a rush and did not let it set in the fridge at all. And it really came out as a gooey circle of glop. The center sunk in and it was hard to serve. Really wouldn’t have been presentable if it weren’t just to my close family. I’ve learned how important that setting is for cheesecake.
However, it was still quite tasty. It was huge for four people, but it did eventually get eaten over a week-long period.
This one had three changes from normal. One, I mixed in most of the cinnamon crumble to the main batter in the mixer. I think this just turned out better and I will probably do it again. Two, I used duck eggs instead of chicken eggs. That was all Whole Foods had in a six pack at the time. They were expensive too, more expensive than the dozen chicken eggs, but I didn’t want to waste any. Three, I didn’t put the frosting on top because I was in such a rush that I didn’t have time to make it.