Getting Started: Microsoft Edge Tools for VS Code

There’s a really neat extension for VS Code that allows you to run Microsoft Edge browser tools. You can use this in conjunction with your own project, or even as stand-alone. It uses browser automation behind the scenes, so it does depend on you having Microsoft Edge installed on your machine. You can add theContinue reading “Getting Started: Microsoft Edge Tools for VS Code”

Here Maps Scroll Wheel Temporary Fix

As my grandma used to say, “there’s only one thing worse than a scroll-linked positioning effect and that’s not being able to scroll at all”. So, with this in mind I have written a temporary fix for the issue in the latest version of HERE Maps that prevents users from scrolling past the map withContinue reading “Here Maps Scroll Wheel Temporary Fix”

Using Sibling Selectors to Style the Element Before the Match

The original question for the below answer was wanting to hide a link when a button that’s next to the link has a “selected” class. This is interesting because this requires a sibling selector, but sibling selectors in CSS are a bit funky… with a sibling selector, the target element is always _subsequent_. That meansContinue reading “Using Sibling Selectors to Style the Element Before the Match”

AJAX Request Interceptor

This is a little funky script to intercept AJAX requests and raise a simple custom event for everything else in your app to listen to. To use this, you just need to listen for a custom event named `AjaxDetected`. The method, url, and any data is passed in the event detail. document.body.addEventListener(‘AjaxDetected’, function (e) {Continue reading “AJAX Request Interceptor”

Rate Limiting Googlebot Across Many Websites

Googlebot is one of the good guys. It will check your robots.txt file and respect any crawl delays you’ve asked it to use. However, if you run hundreds or thousands of websites across your infrastructure you can encounter waves of Googlebot traffic due to it coincidentally selecting many of your websites to crawl at theContinue reading “Rate Limiting Googlebot Across Many Websites”

Execute Raw SQL Scripts in Entity Framework Core

Most of the time, Entity Framework Core will just do the right thing. Every now and then, though, you’ll find that it’s doing something in a bit of a sticky way and you’ll want to take control. Usually it’s when you’re deleting a range on a table with cascading deletes. Here’s an example of theContinue reading “Execute Raw SQL Scripts in Entity Framework Core”