All three of my PreviewApps — PreviewMarkdown, PreviewCode and PreviewYaml — got big updates this week. Headline features: significantly improved font, style and colour selection, across-the-range stability improvements, and faster PreviewCode theme preview presentation.
Continue readingAuthor Archives: smittytone
How to pop up a Picoprobe from the Adafruit QT Py RP2040
A little while back I wrote about Adafruit’s QT Py RP2040 and how it makes a nice, compact Picoprobe. That’s a Raspberry Pi RP2040-based device used as a bridge between your computer and a target device for debugging work using Single Wire Debug (SWD). I first used the QT Py RP2040’s side-mounted GPIO pins, but SWD hosting is a great role for the device’s QT Stemma connector.
Continue readingTackle async signal safety in Swift
How do you safely interrupt a command-line program written in Swift? This question was posed to me this week by a reader who got in touch to point out that boilerplate code included in my How to write macOS command line tools in Swift post might not be totally safe: it could leave a program and system in an undefined state, which is never a good thing. So I took a closer look.

Celebrate the 40th anniversary of the Sinclair ZX81 with this multifunction-key-tastic T-shirt
Nearly half a century ago, Clive Sinclair’s Sinclair Research made history. It released the ZX81, one of the key home computers of the 1980s, as the first low-cost micro available to High Street shoppers. And you can express your love of early 80s tech with my latest retro-wear: the ZX81 keyboard shirt.
Continue readingRaspberry Pi Pico proxies: the Pimoroni Tiny 2040 and the Adafruit QT Py RP2040
Having spent some time with the Raspberry Pi Pico, I thought it was time to try out some of the other RP2040-based development boards that have become available. When it launched the Pico, the Raspberry Pi Foundation said it would make its RP2040 microcontroller available to third-party board makers. Retailers Pimoroni and Adafruit were among the first to toss their caps into the ring. Their offerings: respectively, the Tiny 2040 and the QT Py RP2040.
Continue readingLooking for syntax highlighted QuickLook code previews? Look no further
I’d like to introduce you to the latest member of the PreviewApp family: PreviewCode, which provides syntax-coloured QuickLook previews and Finder icon thumbnails for over 50 programming languages, including Swift, Objective-C, C++, Rust, JavaScript and Python, and data file types for macOS. You can choose to preview your source code any of 100 dark and light themes.
Continue readingStay ahead of git with this sharp script
I work on quite a few git repositories at once, and I don’t always commit changes in one before making changes to another. Or if I do, I don’t always push the changes up straight away. That might not be best practice in software development, but hey, it’s what I do. The issue for me is remembering what state each repo is in. Here’s the script I use to tell me.
Continue readingMNU now supports Mac terminal emulator iTerm2
MNU, my macOS menu bar utility that lets you call up regularly used command line operations and more, now supports iTerm2, the popular alternative to macOS’ own Terminal app.
Continue readingCrop picture files with confidence and pixel-precise offsets, using sips and imageprep
I recently had a rather large number of screenshots to process: specifically to crop them down to a small area about a third of screen width in and two-thirds of its height down. I could have done this manually, but it’s easy enough to make mis-crops when you’re cropping a couple of images by eye, let alone a 100 or so. The solution? Get your Mac to do it for you. Here’s how.
Continue readingHow to fix ‘xcodebuild’ macOS Terminal slowdowns
For a while, running commands and scripts in macOS’ Terminal has felt slower than it should, especially when opening Terminal for the first time. Clearly my .zshrc
file was being run, but there was a very noticeable pause between the completion of the script and before the prompt appeared. The gap was much less on my M1 Mac than my Intel machine, but still noticeable. Got the same problem? Here’s how to fix it.