Investigate JavaScript Execution Times Using Edge Dev Tools

This is a quick exploration of how to use Edge Dev Tools to investigate JavaScript execution time issues. We’ll quickly run a performance profile and identify what part of the JavaScript is the “most responsible” for any performance issues. The idea is to show just the quickest way to find the source of an issue,Continue reading “Investigate JavaScript Execution Times Using Edge Dev Tools”

JQuery and TypeScript – We Have a Big Problem With jquery.d.ts

This is a call to all my TypeScript connections. This is a call to all. We have a big problem with the official Definitely Typed definition for jQuery. The most fundamental definition for the JQuery interface is incorrect, as you can see in the snippet from jquery.d.ts below. We can fix it, but not withoutContinue reading “JQuery and TypeScript – We Have a Big Problem With jquery.d.ts”

CSS Clamp: The Goldilocks of CSS Math Functions

There is a problem I have wrestled with a couple of times, which was frustrating to solve… but can now be easily solved using clamp, which is currently in an Editors Draft of the CSS Values and Units Module Level 4 specification. It is sat alongside similar mathmatical CSS nuggets, such as min and maxContinue reading “CSS Clamp: The Goldilocks of CSS Math Functions”

Entity Type IdentityUserLogin Requires a Primary Key

You will usually come across this problem in .net Core Entity Framework when you first override the OnModelCreating method in your DbContext. The entity type ‘IdentityUserLogin‘ requires a primary key to be defined. If you intended to use a keyless entity type call ‘HasNoKey()’. If you check your DbContext class, you’ll see that when youContinue reading “Entity Type IdentityUserLogin Requires a Primary Key”

Run Multiple PowerShell Scripts from a Master PowerShell Script

Having put together some individual scripts that ripped data out of an Excel spreadsheet, I decided to co-ordinate them with a master PowerShell script that would contain my variables and call out to neat little scripts to do work. PowerShell gets tricky to read when it gets big, so I prefer to have a coupleContinue reading “Run Multiple PowerShell Scripts from a Master PowerShell Script”

Extract an Excel Column to a Text File with PowerShell

Having opened up the same Excel spreadsheet to copy out a list of domain names into a text file for my test automation tools to consume for the third time, I wrote a PowerShell script to do it for me. Yes, it’s the same spreadsheet I mentioned before, it is full of interesting data andContinue reading “Extract an Excel Column to a Text File with PowerShell”

Copy Excel to CSV with PowerShell

Having opened up the same Excel spreadsheet to save the data as a CSV for the third time, I wrote a PowerShell script to do it for me. Simply set the source and destination files and the script takes care of the rest. & { $sourceFile = “C:\Temp\data.xlsx” $outFile = “C:\Temp\data.csv” $excelApplication = New-Object -ComObjectContinue reading “Copy Excel to CSV with PowerShell”

Convert a SQL SELECT into an INSERT Script

Sometimes you want to generate an INSERT script from existing data, perhaps with one or two values tweaked. It’s a pain to hand-crank the INSERT when you can see exactly what you want using a SELECT statement. It’s also a bit long-winded to use SQL import/export wizards or other tools. Sometimes, you just want toContinue reading “Convert a SQL SELECT into an INSERT Script”

Where to Place Your Desk in Relation to Your Windows

Half-human, half-bird; the sirens lured hapless sailors to their destruction. Your window could be doing the same to you in your new WFH set up. Over the years I have been responsible for several office redesigns. The most common trigger for me to wade in and start moving furniture is the location of desks inContinue reading “Where to Place Your Desk in Relation to Your Windows”

Check Certificate Expiry Date in .NET Core

I needed to check the certificate expiry date in an NUnit test. The below snippet can be used to check any certificate properties, using a custom certificate validation callback. All you need to do is read the properties you are interested in within the callback so you can check them afterwards. DateTime notAfter = DateTime.UtcNow;Continue reading “Check Certificate Expiry Date in .NET Core”