Add Timestamp to Images

ImageMagick needs to be installed, including legacy tools, and in the path Takes files with the format yyyyMMdd.jpg in the current directory, and adds a stamp to the bottom-right corner in the MMM dd yyyy format. Creates a new file named “stamped.yyyyMMdd.jpg”

Merge Zip Files to 7z

This script will retrieve all zip files in a directory, unzip them one at a time into new directories, then add those directories to a .7z file. Useful if you have a collection of zip files with mostly the same contents, where you’ll benefit from combining them together, but you don’t have enough disk space […]

Convert MKV to MP4 in PowerShell

This script will retrieve all mkv files in the “input” directory and convert them to mp4, placing the new mp4 files in the “converted” directory You need the HandbrakeCLI application Quality 18 seems to be good for DVD video. HD you would want better quality (lower number is better). This burns subtitles into the output, […]

Go JSON config file

Seems there’s no standard or official way to load configuration files in Go. There are libraries out there, but if you’re just looking for something simple, you’d just read a JSON file into your application. config/configuration.go config/email.go conf.json main.go

Custom Middleware in ASP.NET

Option #1: Implementing IMiddleware Add the middleware to DI, and then use it. In the middleware class, use DI for the constructor, and implement the single InvokeAsync method. Option #2: By Convention Use the middleware, but you don’t need to register it in DI. In the middleware class constructor, accept and store the RequestDelegate, then […]