I remember a couple of things from my earliest days when I learned about security. So why in 2026 does Google allow this? https://meet.google.com/linkredirect?dest=https://vendiadvertising.com Okay, I know why, but I don’t agree. Our take on this is that tooltips are not a reliable security indicator, and can be tampered with…
How to use AI to write code
I’ve been living in Claude lately, just to get a feel for things, and the following is some of things that I’ve learned so far. Brownfield For this discussion, I’m calling brownfield code anything legacy, including something from six months ago that you personally wrote but don’t remember how it…
Doctrine/Symfony MariaDB DSN connection string
When connecting to MySQL/MariaDB with Doctrine you need to specify the version number of the server in the serverVersion query string parameter. In the past it was as simple as serverVersion=mariadb-10.5.10 and things just worked. Recent updates to Doctrine’s DBAL have started to throw warnings that version 4 will require…
Creating a portable copy of pdftotext from source
Recently we had a need to use pdftotext on a server that we couldn’t install packages on, so we decided to download the source for Xpdf and build our own copy. This is generally pretty easy, however by default it requires shared libraries to also be installed on the system…
Gravity Forms shortcode getting extra line breaks when used with ACF
ACF apparently expands shortcodes before returning content, which means if you attempt to run it through the_content filter, any line breaks will get hit by wpautop. We fought and fought and fought, moving filter orders around, removing filters, etc., and finally decided to not fight WordPress, but instead change Gravity…
The magic PHP function: test_data()
STOP USING IT!!!!! If you don’t know this function, let me show it to you: “But it sanitizes my input” – yes, destructively. I’ll let the trim function pass, although that depends on the data you are sourcing. Always delay escaping until you need to render something. Besides being a…
How to move a WordPress database
I often see people asking how to move a WordPress database between servers, and it usually seems like they’re doing it the hard way. I move sites between domains, from PROD to dev, dev to UAT, and so on, and this is how I’ve been doing it for years, 100%…
WordPress – write to .htaccess
If you ever have a need to programmatically write to the .htaccess file, WordPress has a built-in function insert_with_markers to do just that. Calling that function will give you the added benefit of adding “BEGIN” and “END” markers which makes it easier to read. There’s also a sibling function, extract_from_markers,…
Living the proxy life
For local development, we use the Symfony binary which allows us to both use regular host names such as example.wip (work in progress), as well as a TLS certificate so we can use HTTPS. Very awesome. After setup, you just need to add a proxy pac file to your browser/OS…
Messing with the song algorithms
Sometimes you need to introduce some new songs into your music service’s algorithms to spice things up. Here’s my 10 for 2022: 1.) My Pal Foot Foot – The Shaggs Arguably one of the worst songs (and albums) that was ever pressed. So bad that it, to a certain degree,…