Archives
-
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: …
-
Quick Tip: Randomising a resultset from a SQL query
Sometimes I need a random (random enough for my purposes - I don't know, nor care, if it meets a formal definition of random) sample of N rows of data from a table. There's a very quick way to do …
-
Creating projects and solutions using the dotnet command
I've been digging into .NET Core a little bit more recently, with the intention of using it for an upcoming project at work (sssh, don't tell anyone - they don't know yet!) and part of that has …
-
Always make sure you specify the length to CONVERT in SQL
Over the years I've seen this potential blackhole of data loss several times, a developer has written CONVERT(VARCHAR, [ColumnName]) without specifying the length of the VARCHAR to convert the column …