Skip to content

Blog

Got the time?

Photo of the time circuit from Back to the Future

Every few years I end up having to mess with the time. Not like, the linear flow or the speed at which we perceive it. As cool as that would be, I'm usually just messing with mundane Windows time settings. When you're working with physical security systems, maintaining accurate time across all servers and devices is kind of important. And it's common for surveillance and access control networks to be isolated from the Internet, so not only do you need a time source, but you need to distribute the time. Fortunately, Windows has a built-in time server - you just have to know how to turn it on!

Restreaming RTSP with FFmpeg and MediaMTX

ffmpeg logo

If you've ever messed with IP cameras and RTSP video feeds, you might have run into a situation where VLC can access the stream without a problem, but the system meant to record that stream can't seem to do it. There's nothing more permanent than a temporary fix, so in this post I'll show you (and my future self) how to work around the issue.

Why I never learned Bash

I’ve been using a computer since ~1996 (age 12/13). I’ve built many PCs, and installed various Windows and Linux operating systems many hundreds of times over the past 28 years. I played L.O.R.D. on my dads BBS, played DOS games like Wolfenstein 3D, Descent, and Duke Nukem. So far in my IT career I’ve worked as a system administrator, software vendor support, and as software developer. It may surprise you to hear then that I learned my first shell language just 5 years ago, in 2019.

Nerdbank.GitVersioning and the Revision number

Screenshot of various versions returned by the command "nbgv get-version"

I love using the NerdBank.GitVersioning CLI tool nbgv. It completely removes the need to think about an aspect of a project that doesn't add any value to your customers. But today I realized I understood the first three parts of the version produced by nbgv, but the fourth "revision" component was not obvious. Turns out it is a uint16 value of the first two bytes of the commit id!

But I AM the administrator

A while back I was helping a co-worker with a project where the customer needed to automate a lot of minor Windows configuration steps on some Windows IoT server appliances. One of the tasks was to make it possible to disable Windows Firewall, because even an administrator was greeted with the message "For your security, some settings are managed by your system administrator" and the option to change firewall settings was disabled.

Image Comparison

Coastline Bluff

I recently came across a couple of blog posts on image comparison algorithms shared by Dr. Neal Krawetz. One of them, titled "Kind Of Like That", describes the "dHash" algorithm which generates a perceptual hash based on gradients in the image. With more than 200k family photos to wrangle, I wrote up a PowerShell implementation to find similar images and it works surprisingly well!

Parse Code from Markdown Files

Screenshot of Pester test output highlighting the use of aliases within markdown documentation code blocks

Introduction

Are you testing your documentation? If you write PowerShell scripts or modules, you are hopefully using Pester to test your code. And if you use PlatyPS to generate markdown documentation like I do, then you have a bunch of example PowerShell code sitting in .md files. But what happens if you rename a command, a parameter, or make a breaking change?

Generate markdown tables from PowerShell

I had a need to generate a markdown table dynamically from PowerShell, so I wrote a flexible function which uses the properties on the incoming objects to define the column names, supports the definition of maximum column widths, and outputs either pretty-printed markdown with padded values and aligned columns, or "compressed" markdown without the unnecessary padding included.