Run code in a macOS Sandbox

I sometimes test randomly downloaded code on macOS in a Sandbox that has limited and network access. I posted about this way back in Jan 2017, Creating a macOS Sandbox to run Kodi, and this is a short refresher for me… ...

11 Jun 2023

File Date Created = Photo / video metadata

When I export photos or videos from Photos.app, I want the file’s Created Date (Created Date in Finder) to be the time the photo or video was taken. Alas, this is not the way Photos works, and setting the date turned out to be more challenging than expected. ...

4 Jun 2023

Bluetooth keyboard and trackpad battery level

Want to check your connected bluetooth device battery level on a mac? Here is one way: using xbar (I am aware there are a bunch of other xbar plugins to do something similar, but I’ve been using my own script before I ever used xbar). ...

30 Apr 2023

VS Code Snippet to insert formatted date and time

I’ve known that it is possible to create snippets in Visual Studio Code. Recently, I discovered a few tweaks to help me when taking notes. Here, I share a snippet for inserting the date and time in the format of my choosing in a Markdown note. ...

7 Jul 2022

Customizing VS Code for Markdown note-taking

I’ve been using Visual Studio Code for all my notes. I have used Typora, Obsidian, and Zetlr, but I keep coming back to VS Code, because of its extensibility, customizability and integrated terminal. Here is how I set it up for note-taking. ...

18 Jul 2021

PowerShell Pipeline to Rename Files

For me, Microsoft PowerShell is hard! I can’t wrap my mind around data pipelines (|). Instead, I keep reverting to if/then, loops and other traditional programming paradigms, similar to what I’d do in UNIX shell! ...

30 Dec 2019

Enabling PHP in Apache on macOS Catalina 10.15

Every time Apple releases a new version of macOS, I have to go in and re-configure Apache with PHP the way I want it. So this time, I thought I’d automate the configuration changes with a single command. ...

3 Nov 2019

A bash script to search a CSV file

I sometimes need to search a huge CSV file (13 MB), containing 21,000 rows and roundabout 40 columns, which Numbers takes half a minute to open. All I need to do is search and display the results of a few columns only… so I wrote a bash script to do this for me - and I was quite specific in that I wanted the results in color! ...

19 May 2018

Fixing PowerPoint TIFF images and fonts

Microsoft PowerPoint 2016 for Mac (aka version 15) has a strange quirk - when I copy and paste images from Preview or most other applications, the image gets copied in Tagged Image File Format (TIFF). The image is practically uncompressed (or possibly minimally compressed), resulting in very, very huge PPTX files! Plus: Removing unwanted font references. ...

25 Aug 2017

Text Manipulation Cheat Sheet

I recently had the “opportunity” to perform some text manipulation to get data from a huge log file into a spreadsheet. I had done this sort of work a long time ago as a developer, but had forgotten over the years. So I decided to compile a text manipulation cheat-sheet for macOS. ...

26 Jun 2017