Blog

PowerShell Standard Deviation

I recently needed a good way of picking from a list of volumes, free space and directory count where factors. I would almost expect that computing standard deviation and variance for a set of numbers would be built in to System.Math but in their absence, this is what I've come up with:

C# Remote WMI Query

Simple remote wmi query method.

Quick Windows Filesystem Enumeration with PInvoke

Write up forthcoming. Here's the code:

Rip Audio from Video with GStreamer

I reccently found the need to rip the audio from a video file (good for some conference talks), the issue is this, FFMPEG doesn't always have the codec you need. Thankfully I've purchased the Fluendo codec pack for gstreamer, the do stuff with video/audio backend. The following command sets up the gstreamer pipeline for processing the audio all the way from decoding the video to reencoding into an ogg vorbis file. The gst-launch man page has plenty of details on setting up the pipeline, there is tons of power here and I've found better performance on my system than with FFMPEG for audio and video transcoding.

Powershell Live Code Loading (kind of)

Hot code loading is a feature of languages that allows a developer to load new code into a running system without stopping the process. This has some clear benefits on servers, security and feature patches can be added without a risk of downtime. Yes, building your application in a way that you can fail over to a secondary system but that never seemed kosher to me as a patching strategy unless you're working at scale and already account for high availablity. I've implemented some long runner server software in PowerShell and using some of the features it's gleaned from Unix scripting you can hot load new code into them on the fly.