mundus senescit

Shell script to move duplicate files

macos shell

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.

Continue reading...

CoreSimulator Crash Loop

guide macos

Last month, one morning, my MacBook (still running Catalina) started behaving strangely - though I was not running anything, it was sluggish as the CPU was too busy and the fans were on high. I traced it to the iOS Simulator service that comes with XCode.

Continue reading...

AppleScript to change clipboard image format

coding macos office

For the longest time, I’ve struggled to get the macOS version of Microsoft Office (Word, PowerPoint, Excel) to paste images as PNG or JPEG, instead of the default TIFF. TIFFs make the files far larger than they need to be! I’ve resorted to macros, shell scripts, Quick Actions... all paste PNGs (lossless) into MS Office! But I just found another method with AppleScript.

Continue reading...

A few of my bookmarklets

coding javascript

I have a few Javascript bookmarklets that I thought I’d share. Bookmarklets are short snippets of JavaScript code that run in the context of the current web page in the browser. I prefer them over extensions since I can see what the code does. There are plenty on the web, here are a few of mine.

Continue reading...

Visual Studio Code key bindings for curly quotes

guide vscode

When I write, I want proper curly quotes, with the correct opening and closing ‘single’ and “double” quote marks. However, the standard QWERTY keyboard doesn’t have these keys, having only straight 'single' and "double" quotes. Microsoft Office and Apple Pages “Smart Quotes” will automatically fix this, but since I write this blog in Visual Studio Code, here is how I setup my keyboard.

Continue reading...

Tweaks and Hacks to Configure Windows 10

guide windows

I’ve been meaning to post this from the time I built my Windows desktop. But I keep adding to the list of things I need to configure to get Windows 10 into a ”usable” state for me. Unlike with macOS - for which the default installation is well configured, secure, and pretty much good-to-go - the installation and setup of Windows is extremely painful and a terrible experience. I have to spend hours trying different methods to remove junk, disable telemetry, and secure Windows (and still fail)...

Continue reading...

Command to turn off monitor in Windows 10

guide windows powershell

I wanted to turn off my monitor in Windows 10, while listening to music, rather than wait for the Power plan “Turn off the display” timer to kick in. Hmmm, seems Windows has never improved, because I recall having this requirement back-in-the-day - haha, that was during my first project ever, when I was involved in some Win32 development...

Continue reading...