Programming

UK Postcode RegEx

UK Postcode RegEx Recently I needed to validate UK postcodes for a site I was building, after a bit of hunting around this seemed to be the best one that I could find, hopefully this will save me some Googling in future! ^([Gg][Ii][Rr] 0[Aa]{2})|((([A-Za-z][0-9]{1,2})|(([A-Za-z][A-Ha-hJ-Yj-y][0-9]{1,2})|(([A-Za-z][0-9][A-Za-z])|([A-Za-z][A-Ha-hJ-Yj-y][0-9]?[A-Za-z]))))\s?[0-9][A-Za-z]{2})$

By Shinigami, ago
Programming

Tag helpers in ASP.NET

Tag helpers in ASP.NET Tag helpers are a new feature in MVC 6 and are similar to the old style HTML helper methods though they have a more HTML like syntax. There’s plenty of good guides about how to use them around so I’m not going to rehash that here, Read more…

By Shinigami, ago
Programming

Windows IoT Default Application

How to set the default application in Windows IoT on a Raspberry Pi I’ve recently finished a project which turns my Lifx lightbulbs on and off through calls to their API from a Raspberry Pi running Windows IoT. This deployed fine to the Raspberry Pi but it proved impossible to Read more…

By Shinigami, ago
Programming

NuGet Package Creation

How to create a NuGet package from a .NET Core class library I’ve built a few class libraries recently but in order to use them in other projects they need to be created as a NuGet package and uploaded. The easiest way to creat the NuGet package is to add Read more…

By Shinigami, ago
Programming

Live Chart.js Charts

I wanted to use Chart.js charts in my ASP.NET Core projects and as there didn’t seem to be anything existing that fit the bill decided to do it myself. Chart Creation There seems to be a few projects around for generating the relevant javascript for Chart.js but all the ones Read more…

By Shinigami, ago
Programming

Enabling HTTPS Rewrites

When setting up a website, even if it’s just a generic blog like this one, it’s good to encrypt traffic to and from it using SSL. Obtaining certificates If you’re hosting a site on it’s own custom domain name rather than using a free hosting provider then you’ll likely need Read more…

By Shinigami, ago