In the wake of Charlie Kirk's murder, our so-called Department of Justice has removed access to a study they did that showed the opposite of the narrative currently trying to be spun by the White House, the FBI, Twitter (which is mostly Russian and Chinese bots these days), and Fox. They desperately want folks to believe it's the Democrats and other leftists sowing the seeds of violence when instead the data shows clearly that the call is coming from inside the house: that it's mostly those who vote Republican who are responsible.
You may not need to throttle your JS event handlers
Your heart may be in the right place. There's no point in thrashing the CPU for events like mousemove and scroll that are theoretically going to fire hundreds of times per second, right? But have you checked whether or not your throttling is actually necessary?
Keep on readin' on You may not need to throttle your JS event handlers⟶
Save $20 or more by editing PDFs with LibreOffice
Every so often I need to edit a PDF I get from another source, and then I go on this needless and mostly-fruitless endeavor to find a place on the internet to make those edits ⸺ forgetting that I already know of and have a place to do it.
Keep on readin' on Save $20 or more by editing PDFs with LibreOffice⟶
Road rage is the stupidest thing
For how dangerous it is, it accomplishes a world of nothing. I can't speak for other countries, but if you live in the US, too many people out there in public around you have limited or no emotional intelligence. They simply react to stimuli instead of pausing to think. This is quite literally how insects work! Thanks to these reactors, you can go from minding your own business to the receiving end of someone's childish tirade over something minor ⸺ or even nothing at all. As you might expect given that intro, I was the victim of a brief potential road rage a few weeks ago. It unfolded as follows...
ChatGPT loves to offer up its own diagrams
But it doesn't know what the hell it's doing. Don't believe its lies.
Keep on readin' on ChatGPT loves to offer up its own diagrams⟶
Be wary when footer debugging
I know you're not "supposed" to debug things by outputting them into or past the footer of a site, but sometimes you just need to check on something real quick, like the ID or some other bit of data about a post, and you don't feel like dealing with any proper debugging tools. The wp_footer hook then gets used and the results don't make sense. What happened?
Twenty-one lessons from the beach
In no particular order of importance because none of them are ultimately important... except perhaps the very last one.
AI is designed to ruin lives
Is this a sufficiently clickbait title, you think? Still, I do kinda firmly believe this is the case ⸺ that AI's overarching goals are rooted in the desire to replace paid, job-holding humans with much cheaper automation. There's no way to tell how many fewer jobs will be available in five years, but I reckon the damage will be great and the numbers very high.
Add domain name to every site's root class list
As a purveyor of userstyles, I found myself wanting to change a tiny thing here or there on various sites without giving them each their own tiny stylesheet. I also didn't want to start adding random selectors to a global stylesheet and identifying them by comment; I wanted to identify sites by their domain, e.g. html.apnews-com and keep all styles for that site nested underneath. In order to do this, I think a userscript needs to be involved.
Keep on readin' on Add domain name to every site's root class list⟶
Enqueue inline JS at the WordPress footer hook
WooCommerce has a handy function you might like to include in your toolbag even when that plugin isn't in play: wc_enqueue_js(). It takes a string of JS code, wraps it in jQuery, outputs it in the footer of your site, and runs it when the DOMContentLoaded event fires. Neat? I guess!
Keep on readin' on Enqueue inline JS at the WordPress footer hook⟶