A small PHP update to GeSHi


The PHP logo.

The faithful old GeSHi Syntax Highlighter hasn't seen an update in a many a long year. It's a tried and trusted way to do server-side code highlighting - turning a myriad of programming languages into beautiful HTML & CSS. A few weeks ago, I noticed someone had proposed an update to its HTML rendering. The changes were mostly adding in new element names. PHP has been updated several times since GeSHi was last updated, so I thought I'd do the same. Here's an update to the PHP highlighter. …

Continue reading →

Book Review: It's Not That Radical - Climate Action to Transform Our World by Mikaela Loach


Book cover.

I think I mostly agree with everything this book is saying, but after almost every paragraph I found myself scribbling the same note "Yes! But what action should I take though?" The author has an excellent and accessible way of showing the problems caused by the Climate Crisis - but the "action" part is mostly missing. Take this example: So something you can do right now to tackle them is to divest your money from them. Find out if your bank still has investments in fossil fuels and if they…

Continue reading →

Book Review: Murder Your Employer - The McMasters Guide to Homicide by Rupert Holmes


Book cover featuring an old fashioned line drawing of an employee holding a knife behind his back.

What if the Discworld's Assassin's Guild existed in the real world? That's it. That's the plot. Go to a university where they'll teach you to be a better class of murderer. The first half is excellent. Chuckles all the way through. A heady mix of every boarding-school novel you've ever read, and funny little twists and turns. Lots of the dialogue is straight out of Terry Pratchett (and I can't be the only one to notice that the school crest features an Anhk and Morpork, right?). It is a very…

Continue reading →

Gadget Review: 6-Colour ePaper Name Badge


Skintones rendered on eInk.

The good folks at SmartDisplayer Technology Co have sent me a six colour eInk badge to play about with. Here's a quick video and then a walk-through of its features. You can also view SmartDisplayer's official video. The Badge It is a single block of plastic. There are no seams, screws, or rough edges. The ePaper appear right on the surface of the badge, there's no recessing or anything to indicate that this is a high-tech gadget. It uses their "cold lamination" technology which creates …

Continue reading →

Introducing Pretty Print HTML for PHP 8.4


The HTML5 Logo.

I'm delight to announce the first release of my opinionated HTML Pretty Printer for new versions of PHP. Grab the code from Packagist Contribute on GitLab There are several prettifiers on Packagist, but I think mine is the only one which works with the new Dom\HTMLDocument class. Table of ContentsWhatHowLimitationsWhyNext Steps What This takes hard-to-read HTML like: <!doctype html><html><head><meta charset="UTF-8"></head><body><div id="main" class="news main"><h1…

Continue reading →

Is this the smallest USB-C hub?


Tiny hub nestled in the palm of my hand.

The gadget wizards at Benfei know that I'm a sucker for any sort of USB-C gadget. So when they offered to send me their micro-hub to review, how could I refuse? It is dinky! Here's what you get for your tenner USB-C PowerDelivery HDMI USB-A Frankly, I'm impressed that they managed to fit that much in! If you'll excuse my lacklustre photo-editing skills, here are the two output ports: This is what it looks like plugged into a laptop: The spec says it will use about 10 Watts for…

Continue reading →

That's Not How A SIM Swap Attack Works


A padlock engraved into a circuit board.

There's a disturbing article in The Guardian about a person who was on the receiving end of a successful cybersecurity attack. EE texted to say they had processed my sim activation request, and the new sim would be active in 24 hours. I was told to contact them if I hadn’t requested this. I hadn’t, so I did so immediately. Twenty-four hours later, my mobile stopped working and money was withdrawn from my bank account. With their alien sim, the ­fraudster infiltrated my handset and stole deta…

Continue reading →

Gadget Review: Benfei SATA to USB-C Drive Enclosure


Plastic box with a SATA connector.

The good folks at Benfei know that I'm always losing my USB Thumb Drives. They're just too damn small. I crave something bigger and harder to lose. Not as huge as a CD Drive, but not as small as a MiniDisc. Something chunky and satisfying, with a slim elegance. So they've sent me their SATA to USB-C drive enclosure. It's a cute little box, with a built-in USB-C cable. The cable has one of those weird adapters which lets you convert it back to USB-A. Personally, I think we should force…

Continue reading →

Gadget Review: Benfei USB-C to Ethernet Adapter


A USB-C to Ethernet converter.

Sure, WiFi is basically fine. But sometimes you need the raw power, high speed, and utter reliability of Ethernet. Billions of packets hurtling down twisted copper pair in order to deliver your data - that's what it is all about, right? But - alas! - laptops don't have Ethernet ports these days. And mobile phones tend to shun them as well. Who can save us from the tyranny of multi-GigaHertz radiowaves?! The good folk at Benfei have sent me their latest gadget and, somehow, I need to make 300…

Continue reading →

You don't need an API key to archive Twitter Data


The Twitter logo.

Apparently there's no need for IP laws any more, so here's a way to archive high-fidelity Twitter data without signing up for an expensive API key. This is perfect for academics wishing to preserve Tweets, journalists wanting to download evidence, or simply embedding content without leaking user data back to Twitter. Table of Contentstl;drBackgroundEmbed CodeAPI CallOptionsOutputTweet With ImageRepliesQuote TweetsDownloading MediaOther ExamplesLimitationsPython CodeHave Fun tl;dr You can…

Continue reading →

Book Review: Great Robots of History by Tim Major


Pygmalion kissing a statue who has been brought to life.

This is a lovely and twisted anthology of stories. Each presents a "historic" robot - be they an automaton, a puppet given life by the gods, or a resurrected villager. Some, like the Mechanical Turk, are historical fact but others are invented just for us to gawk at. The stories are mostly dark and brooding, with the macabre turn. They're fun - but the constant theme is "what if I, an intelligent person, got trapped in the brain of a dullard?" Robots who are self-aware of their limitations…

Continue reading →

Gadget Review: Benfei Laptop Riser with Built-In USB-C Dock


A metal laptop stand with USB ports built in.

The good folks at Benfei have sent me a laptop stand to review. You know the drill, a few pieces of metal, some hinges, and rubber feet. But this stand holds a little more interest for the gadget lover - a built in USB-C hub! What do you get for your £35? USB-C power input - capable of taking 100W of PowerDelivery. A built-in USB-C cable to connect to your laptop. HDMI port which supports 4k @ 60Hz. Four USB-A ports. And that's it! There isn't any DisplayPort, no Ethernet, no sound, no …

Continue reading →