blog
My blog of techy stuff, ranging around SQL (SQL Server, that is), C# and .net, JavaScript and a smattering of stuff about the Orchard CMS (that powers my site) as I get more familiar with it. There's the occasional non-technical post when something is of interest to me that I feel is worth sharing, but they should be few and far between
-
Using the CommandLineParser NuGet package to handle your command line
From time to time I've needed to write small console apps that accept parameters via the command line. Luckily, parsing the command line is a solved problem and there are multiple libraries out …
-
Making sure Windows doesn't start your service before SQL Server
This is more of a "note to self" of the syntax, but, if you have a service that depends on another (such as a local SQL Server instance for local logging) then you can tell Windows about that …
-
Finding the process template for a your TFS 2015 projects
If you're trying to determine what Process Template was used when the projects in a given TFS project collection were created, the quickest way to do this that I've found is to run the following …
-
What's an Estimated Subtree Cost?
When you're looking at the execution plan for a query (you do that, right?) one of the data-points that's shown is "Estimated Subtree Cost". Looking at this is one of the things I review when I've …
-
Getting a 403.501 error response from IIS? Check your 'Dynamic IP Restriction Settings'
One of the applications I inherited is composed of multiple applications and uses one of them as a central authentication solution (issuing tokens on login, refreshing them, revoking them, etc,..) …
-
Using the AngularJS 'ng-required' attribute to make fields co-dependent
One of the bugs I had to fix recently was around ensuring that if Field X was populated, then Field Y became required. In the example I was working with this was all the more complicated due to …
-
Creating a linked server that has a different name to the "real" server
It's sometimes useful to be able to have a linked server where the name is misleading. One example of this could be where you don't have a perfectly isolated test or staging infrastructure so you …
-
How to console.log the name of the variable as well as its value
This tweet from @wesbos is a great tip, anything that makes working with JavaScript in Developer Tools for your browser of choice has got to be a bonus, right?
Wrap your console.log arguments in …
-
Counting the number of installed certificates via PowerShell
Bit of a random one, but should you ever need to count the number of certificates that are installed on a Windows Machine in the "Local Machine" store, here's a short PowerShell snippet that'll do …
-
"unable to load certificates" when using openssl to generate a PFX
If you've tried to follow the instructions in my Generating an SSL certificate with SANs via a Windows Certificate Authority post and have run a command to combine the certificate and private key: …