My custom Grav theme

I re-designed my blog template using a new CSS framework called Bluma, re-developed all JavaScript without jQuery and customized some plugins. This was quite a journey, so this post is going to be quite long too! ...

20 May 2019

Prototyping with a Node-RED container

If the preceding posts on Node.js and MongoDB have been too complex for you, let me introduce you to a simpler drag-and-drop “flow-editor,” Node-RED.. It was developed and open-sourced by IBM, and is now hosted by the OpenJS Foundation (the same foundation that hosts projects like jQuery, and Dojo). I’ve used Node-RED for quick prototypes and demos, as it’s easy to explain each step of the flow. It saves a lot of coding effort and reduces errors buy providing built-in and pre-built third-party “nodes”. ...

16 Apr 2019

Batch file to list deleted files

Well, it turns out that after creating a PowerShell script to list deleted files (part 1) and another PowerShell script to monitor for deleted, renamed or moved files (part 2), I’ve decided to revert to a simple, batch file instead because running a batch file is so much easier than PowerShell! ...

12 Jul 2018

PowerShell to monitor for deleted, renamed or moved files (part 2)

This is part 2, of my attempt to “sync” photos I deleted on my desktop to my SD card (you can read part 1 first). In this post, I try to use PowerShell with .NET framework to (try) monitor for file system changes, and output to a batch file that “replicates” the ren (rename) and del (delete) to files and folders. ...

17 Jun 2018

PowerShell to list deleted files (part 1)

I have an unusual workflow when copying photos from my camera’s SD card to my Windows desktop. For any photos I my desktop, I want to also delete on the SD card. In this post (part 1 of 2), I describe my PowerShell script to “repeat” what I deleted on the desktop on the SD card. In my next post, part 2, I expand the PowerShell script to (try) monitor for file system changes instead. ...

16 Jun 2018

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

Convert SVG to PNG using your browser

Lots of web pages now rely on SVG instead of PNG or JPG images. SVG stands for Scalable Vector Graphics, an XML-based vector image format that scales well, unlike bitmap images (bitmaps become pixelated when up-sized). I recently wanted a quick way to convert a SVG to PNG, and discovered modern browsers (read: Chrome and Firefox) can do this with a simple bit of code. ...

23 Sep 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

Screen capture script for retina display with PNG optimization

Forget the complex or manual steps, or costly tools to get screen shots scaled down from a retina display. I have a shell script that triggers an interactive window screen capture, saves the screen shot (assumed to be 2x retina display), re-sizes it to 1x and compresses the PNG further! Best of all, it does not require paid software or Automator. ...

19 Oct 2015