Hands down, the most repulsive Python code I’ve written in at least a quarter
Hands down, the most repulsive Python code I’ve written in at least a quarter Read More »
Had this come up with a client recently… A software vulnerability was discovered that could—potentially—result in a WordPress site throwing 500 errors. My client operates dozens of sites and needed to know if any of their sites were affected. Shell to the rescue. First, I exported a complete list of sites from their host (WP
One-line shell script to get the HTTP status of multiple sites Read More »
This has bitten me more than once. When using the requests Python package to make REST API calls to a WordPress site hosted on WP Engine, their security dingus will throw a 403 for no apparent reason. If this happens to you, change the User-Agent string in the request header before sending. It can honestly
WP Engine Returns 403 Forbidden with Python + Requests Read More »
A client wanted an animated image effect similar to somebody whimsically underlining a few words of text with an equally whimsical colored writing instrument. Thankfully, this is pretty straightforward with the use of keyframes in CSS. In a nut, we start with a width attribute of 0 on the element we want to animate, then
How to animate an image reveal in pure CSS with Keyframes Read More »
I’ve wanted to learn how to do this for ages, and today I got the chance. This simple WordPress shortcode will find all of the children of the current post and spit out an <ul> of them with titles and links. The shortcode has two optional parameters: In reality, the shortcode looks like this: [foo_generate_inline_menu
A Simple Example of a WordPress Shortcode with Parameters Read More »
(This came up recently in a client project and I thought it was a fun (and fairly straightforward) example of the Intersection Observer JavaScript API.) So you want to underline some text when some event happens. Either on hover or when it enters the viewport. In the former case, it’s easy to do using plain
How to animate text underlining with the Intersection Observer API Read More »
A client asked me to do a bit of data collection and collation from a few sites he visits. Specifically, he was looking for a list of articles and their authors from popular sites in the circles wherein he operates. So, as I often do, I reached for my beloved Python. Ahem. The goal was
Fun with Python Dataclasses, Inheritance, and CSVs Read More »