All Blog Posts

Using Tailwind with Vue

13 December 2017

Tailwind is a CSS framework which allows you rapidly build custom user interfaces. As opposed to frameworks like Bootstrap, Bulma and Foundation, it is not a UI Kit. It has no theme or components, but instead allow you to construct your own components by combining a bunch of CSS utilities. So for example, instead of supplying you with a Card component, you can build your own Card by applying the Tailwind CSS styles to a combination of HTML elements.

Using MariaDB with ASP.NET Core 2.0

12 December 2017

As part of my recent explorations I have looked into various ways of hosting an ASP.NET Core application. One path I explored was using MariaDB as an alternative to the SQL Server world which most .NET developers are used to. So what is MariaDB? From the Wikipedia article about it: MariaDB is a community-developed fork of the MySQL relational database management system intended to remain free under the GNU GPL.

TIL: The @ symbol in JavaScript import statement

11 December 2017

Today I Learned (TIL): About the usage of the @ symbol in the JavaScript import statement. I am busy working on a new project and I am using Vue to develop the front-end. I used the Vue Webpack template to bootstrap the project, and I have noticed the usage of the @ symbol in the import statement in various places. For example, here is the imports from my router/index.js file:

Building future dated previews with Hugo and Netlify

06 December 2017

Hugo allows you to future date posts and specify whether you want to generate those future dated posts. It does so via a combination of front matter and command line options for the hugo command. How front matter controls publication date As an example, I want to publish this blog post on 6 December 2017, but I am writing it on 5 December 2017. Hugo has two different front matter variables which control the publication date of a post.

Why I like Netlify

05 December 2017

A few months back I switched my blog over from Jekyll hosted GitHub Pages to Hugo hosted on Netlify. The two main reasons were speed and HTTPS. More specifically, after five years’ worth of blog posts, Jekyll stared to become a bit slow to regenerate the website. Initial tests with Hugo however proved that it was very quick. The other reason was that I was thinking of migrating over to HTTPS.

Add mapping to your application with Leaflet.js

04 December 2017

When adding mapping to your application, the most common mapping libraries developers seem to use is either Mapbox or Google Maps. Both of these are great options, but both have limited free tier usage. Once you go past the free tier usage limit or you place the map behind a login, you start paying. And the costs can mount up quickly. There is however a free alternative available in OpenStreetMap.

Creating Authorization Policies dynamically with ASP.NET Core

20 November 2017

ASP.NET Core contains a DefaultAuthorizationPolicyProvider class which resolves authorization policies at runtime. I was watching a recording of the Implementing Authorization for Applications and APIs talk from NDC Oslo by Dominick Baier and Brock Allen and saw a technique they demonstrated to resolve authorization policies dynamically at runtime. I did an internet search and could not find this documented anywhere, so in this blog post I will explain how to do this.

Obtaining an Access Token from a GitHub Application Webhook

14 November 2017

When developing a Webhook for a GitHub application, you may want to make calls to the GitHub API. In order to do this you will need to have a Bearer token to authorize the calls. In a typical scenario, you would obtain a token as part of the user authorization flow, but when developing a webhook for a GitHub application things work a bit differently as there is no interactive user involved.

Scheduling Hugo posts on Netlify

23 October 2017

I recently switched by blog over from Jekyll running on GitHub Pages, to Hugo running on Netlify. One of the things I investigated was how to schedule blog posts on Netlify. This is, as with most other Static Website Generators, not something which is supported out of the box due to the fact that these websites are not dynamic. The content is created when the static generator runs, so you need some way to re-generate the website at a future date and time to include those future-dated posts.

New Adventures

19 October 2017

It is time for new adventures. Over the past months, I have started feeling what seemed at the time like an unhappiness with my work. After reflecting on this for a while, I have realised that there was nothing inherent about the work at Auth0 which made me unhappy. It is a great company with great people, and the work is, for the most part, satisfying and challenging. Instead, I realised that I felt unhappy and frustrated because I am, in a sense, working on the wrong stuff.