Shell script to move duplicate files

I setup Firefox on macOS to automatically download files to my “Downloads” folder without prompting (under Preferences… > Downloads, and select Save files to… instead of Always ask you where to save files). If there is an existing file with the same name, Firefox appends (1) to the filename (then (2), (3) and so on). Over time, I land up with files with similar file names, which may or may not be identical. This shell script finds and moves duplicate files to a different folder… for subsequent manual deletion. ...

9 Jul 2021

Migrating from bash shell scripts to Python

I recently wanted to migrate from a Bash 3 shell script to Python 3. This is nothing but a brain dump comparing a few bits and bobs. ...

11 Mar 2021

Custom icons in Windows Start Menu Medium Tiles

In the Windows 10 Start Menu, I used Pin To Start to a medium sized tile for Firefox - and the icon is nice and large - but is not the case for other shortcuts. I was wondered why… and how to make all the icons have a more consistent look. ...

21 Jan 2021

macOS zsh configuration

From macOS Catalina 10.5 onwards, zsh is the default shell, instead of bash. I have a lot to learn about this shell, and so far, this is how I configured zsh… There is an overload of snippets on-line, but I’ve not seen a post doing what I do, so hopefully this helps someone! ...

7 May 2020

OCRmyPDF: searchable text from images

I recently had a bunch of screen shots that I wanted to OCR, so that I could search for text content in the future. I found an open source solution called OCRmyPDF (created by jbarlow83 over on GitHub) to be very simple to use. It’s also very well documented with many usage examples, including my preferred option - from a Docker container. ...

16 Dec 2019

Touch Bar Quick Action Scripts

Just sharing some Automator scripts I use for Touch Bar Quick Actions showcasing three different methods - using pre-defined Actions, using AppleScripts and using Shell scripts. ...

18 Sep 2019

Three Ways to Quickly Toggle Dark Mode

Here’s are a few short tips - to toggle Dark Mode on macOS without opening System Preferences. Useful when designing your Dark Mode enabled web site using prefers-color-sheme Media Query, like I did. ...

4 Aug 2019

Building and packaging Wine 4.12.1 (32-bit and 64-bit) automatically

For a while now, I’ve been posting about compiling Wine on macOS, starting with Wine 1.9 in October 2016, then automating the compile for Wine 2.9 32-bit in May 2017. Now it’s July 2019, and this is probably my last post on the subject - a fully automated script to download and compile Wine 4.12.1 (released 7 July 2019) 32-bit and 64-bit on macOS. ...

31 Jul 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

Using an exFAT drive for Time Machine backups

I got a new 2 TB external disk - “yay” - and wanted to use it for both on my Windows desktop and for Time Machine backups. Immediately thought to format it as exFAT but quickly came to realize Time Machine does not support exFAT! Fortunately, there is a workaround… ...

22 Mar 2018