Blog

Opening first few lines of a huge file with VS Code

O

I’m currently doing some work looking at the GeoNames dataset. allCountries.txt is around 1.5gb, which is pretty large, and certainly too large to open up in vscode for a quick look. However, I found I could use head command, which reads the first n lines of a file, and pipe the output to code - (which is the command for opening vs code and reading the output from another program) For...

Medium Wont Add Canonical Links Despite Broken Import Tool

M

Medium has to be one of the most disjointed platforms I’ve ever used. Their import tool recently stopped working, inexplicably, simply throwing this error, with no further explanation: Without the import tool, it’s impossible to set a canonical link back to the original source of the content (which should definitely be your own blog) – risking duplicate content SEO penalties...

Using Google Sheets and Azure Functions as a headless CMS

U

One of my clients came to me with a relatively simple requirement; they needed to take online payments for their fitness event photography business. The model is quite simple: There are several different competition dates per year. Competitors can purchase professional photos of themselves at a competition. Each competitor will have a ‘badge number’ to identify them. If purchased before the...

Using Mediatr with Azure Functions

U

I’ve used Mediatr for some time, to reduce controller action bloat, and have spoken about it a few times, on how I use it to avoid the classic ‘xService’ pattern: Controller Action -> ‘Service’ -> Repo Lately, I’ve been doing a lot of work with Azure Functions, and would like to be able to use Mediatr, as I can in ASP.net Core. Up until recently, this has been...

Registration Form Used To Send Spam Via Welcome Email

R

While reviewing a client site, I recently noticed a small number of accounts had registered with spurious firstName and lastName values such as: firstName:You have 5 new messages from Patty: lastName: 12 firstName:You have 5 new messages from Patty:lastName: After some digging, it appeared these customers had legitimate email addresses, however had placed no orders, nor had they interacted with...