Posts

Version your Visual Studio Builds by Git Commit Hash

Image
Semantic versioning is great, but more often than not, when I'm looking at a folder of deployed binaries, I want to know the git  commit   hash of the source code that was used to generate them (a versioned container might be better in some cases, but that's not applicable in every situation at the moment). A simple way to accomplish this is to generate a "version.txt" file at build time that will eventually be deployed with the code. Visual Studio makes it pretty easy to automatically generate this version.txt file with it's built in " build events ". Simply add the following line to the "Post-build event command line:" textbox, and a version.txt file will appear in your build output directory with the current commit hash after a successful build. "C:\Program Files\Git\bin\git.exe" rev-parse HEAD > "$(ProjectDir)$(OutDir)version.txt" If you'd like to generate this file after an Azure Kudu deployment, se

Replace Azure Scheduler with Azure Functions

Image
I have written before about the shortcomings of the Azure Scheduler  (doesn't integrate with classic [non-RM] Azure Storage accounts, message body pushed to Azure Storage Queue is wrapped in XML, costs $15/mo for basic scheduling tasks...) but the good news is, now with Azure Functions , your Scheduler Tasks can mostly be replaced with Functions. Here are a couple tables to break down the differences in Triggers and Actions. Scheduler Triggers compared to Function Input Bindings Scheduler Functions Manual X X Timer X X Http X Storage Queue X Service Bus Queue X Service Bus Topic X Blob X Event Hub X Scheduler Actions  compared to Built-in Function Output Bindings   Scheduler Functions Http X X Storage Queue X X Service Bus Queue

Census.gov QuickFacts Data Set

To create a visualization for  https://www.sizzleanalytics.com/  I had to compile census information from the census.gov QuickFacts tool. As for as I could tell, they don't provide an easy way to automatically download all the data, so I manually downloaded each state then used a simple node script to merge them together. Data set available here: https://data.world/aaronhoffman/census-gov-state-quickfacts Hope this helps, Aaron