I was annoyed by a problem that cropped up in the latest version of MacVim when using SFTP with the included Netrw plugin. It showed an error every time I opened a directory. So I filed a bug and helped get it fixed. I spent a fair amount of time looking for the exact commit in the Netrw code where the problem started. I then filed a GitHub issue about it with that information. It got fixed in like an hour, at least in the repo. Still waiting for it to make it to MacVim.
Continue reading post "Vim: Netrw SFTP error"Toby's Log
Proposal: *daily
I propose that, for any word that ends with the suffix “day”, the suffix can be replaced with “daily”. The new word shall be equivalent to putting the word “every” before that word. For example, “Mondaily” means every Monday, “Tuesdaily” means every Tuesday, etc. Seems a useful shortcut to discuss these. For example, “Fridaily I go into the office” seems a little quicker and simpler sounding than “Every Friday I go into the office”.
Continue reading post "Proposal: *daily"Project: Website theme switcher
I finally made a theme switcher for my website. Ever since I saw the CSS Zen Garden, I loved the idea of using the same markup with completely different appearances. This led to a desire to have multiple themes and an ability to switch them on my own site. Early on I didn’t have the ability, and later I didn’t, have the energy or time, or decide on the way I wanted to do it. There are performance and complexity considerations, as well as needing to make decent themes other than the default one. My eventual desire to have a static-friendly site complicated the performance aspect as well.
Some browsers have a built in way to change to alternate stylesheets, but they stupidly download all of them even when they’re not being used. I’m not doing that. So JS or a server-side cookie solution are needed, and the latter won’t work for static sites. I try to minimize the JS on my site and didn’t want something heavy or complex, especially if it were loading before page render.
Recently, I had the energy and decided on a simple, lightweight JS way to do it. I decided to start it even without real alternative themes.
Continue reading post "Project: Website theme switcher"Hope everyone had a good Thanksgiving. Mine was good, good food and lots of people at Cousin Paul’s. I made pecan tassies this time for ease of timing. They turned out a little weird and crumbly, and I did get a request for the cheesecake I made last year. The most interesting thing about this Thanksgiving, though, was the snow.
Continue reading post "#4705"I don’t use npm often. When I do, I tend to be reminded of annoyances in using it. One such annoyance is that it doesn’t take into account the node version in use when installing new packages, as I posted about four years ago. It just goes with the latest if no version is specified, regardless of its ability to run in the available environment. So I have to manually step back versions until I find one that works. The alternative package manager yarn at least has the good grace to error out for incompatible versions, so I used that and just decremented the version of each package until it stopped erroring.
Some of us like to let our OS package manager manage our OS-wide software for security, stability, and simplicity, and that isn’t always the latest and greatest.
Dunc got skunked
My brother’s dog, Duncan, got skunked recently while I was walking him. They were very close quarters between, in a ditch / drainage pipe, so I don’t think I got any on me. It was dark, and around a bush from me, so I didn’t even see the critter, and didn’t know it was a skunk until after I had pulled him away and noticed the smell. But it was quite some work to get him cleaned up.
Continue reading post "Dunc got skunked"MacOS 15.7.2 seems to have fixed my issue with very slow Touch ID on awakening. Back to normal allowing Touch ID in a few seconds at most. Definitely makes things go faster.
Symfony templates for WordPress pages
I’ve been using Symfony for all of my site pages except the blog, which is run with WordPress. Originally I was using a standard WordPress theme that made my blog look different than the rest of my site. I had looked into ways to pull WordPress through a controller action and stuff like that, but ran into difficulties. I ended up using a solution where WordPress functions as normal for the subpath that it is in, but code in a custom theme boots the kernel from the Symfony part of my site and uses the twig service to render the template. Output buffering is used to capture the normal output of the site to pass to twig.
My theme code does some other things, but I will try to present a stripped down version that could work with a Symfony Standard Edition site for the purposes of this post to hopefully help others do the same.
Continue reading post "Symfony templates for WordPress pages"Updated to Symfony 6.4
Since updating my server earlier in the year, and thus moving to PHP 8, I would’ve been able to update to Symfony 6. I didn’t get around to it until today, though. I’ve been fixing deprecations in my code mostly as they appear (in profiler, console, logs, or automated tests) so I didn’t have a lot to do this time. I changed ^5.4 to ^6.4 in my composer.json and then had to adjust a few minor things in config. Some of those took longer than they should’ve though.
He who lives by the sword shall see violence as the solution to all ills.