Below are some of my recent blog articles.



Time-based One Time Password

A nice easy-to-use RFC-6238 based algorithm, that provides a HMAC-based One-Time Password authentication. The algorithm is based on one outlined in this article here. The interval is in seconds. It dictates how long before a TOTP expires. For example, if a TOTP is generated at 14:20 and the interval is 120 seconds. The TOTP will […]

Read More…


Windows 10 stuck at loading screen under Apple OS Bootcamp

Recently, I had to tackle an issue with my Apple MacBook Pro that is running Windows 10 under Bootcamp, which I thought I would share in case anyone else finds themselves in a similar situation. Especially with the prospect of starting from scratch. One night I booted-up my MacBook and held down the shift key […]

Read More…


UK National Holidays API

The UK Government have a useful web page for all of the UK’s National Holidays, such as Easter and Christmas. This can be found with the link here In addition to this, there is also a really handy public API, which is the JSON representation of the web page (Just add .json to the […]

Read More…


Get Substring by text in SQL

In Microsoft SQL, the SUBSTRING allows you extract part of a string using a start index and length. For example: SELECT SUBSTRING(‘hello world’, 2, 3)   Results in an output of ‘ell’. However, there is no ability to select the start and end of the sub-string using known letters or words. The SQL example shown below […]

Read More…


Random AlphaNumeric Generator

Recently I needed to write a simple token generator for a project. In order to make it print-friendly and easy to read, I decided to make it an uppercase alphanumeric string. The code uses the ASCII (American Standard Code for Information Interchange) numeric representation of the character. A-Z (uppercase) is any number between 65 and 90. To […]

Read More…