New Year, new habits, and new passwords?

New Year, new habits, and new passwords?

As we wave goodbye to the pain that was 2020, some people are looking for a different kind of New Years Resolution; even one that they might follow for once! I am looking to improve my fitness; working from home gives me more free time, the lack of which was always my reason for not exercising! Another kind of fitness is “Digital Fitness”; the first and perhaps most crucial step in improving your Digital Fitness is security, stronger passwords being an easy first step.

Beef up those Passwords.

We are often told that we should use long and complex passwords; but remembering them is hard, especially for those who do not use them regularly. This then results in the less savvy user simply changing a part of their password (like a number) each time they get forced to create a new password; this way they can remember one long password with a slight change rather than a new long password every ninety days.

Read more

Creating a sitemap.xml file with Jekyll

Creating a sitemap.xml file with Jekyll

As the previous post on this site explained, I have switched this site to a static site generator. The site generator I chose is called Jekyll that can be extended using various add-ons; it also includes a powerful template generator called liquid.

The latest challenge I came across in this migration is creating a sitemap.xml file to allow search engines to discover all the pages on my site. There is a plugin, called Jekyll Sitemap, that can generate a sitemap; however, it doesn’t give me the customisation level required. My solution to creating a sitemap.xml file using Jekyll is to embrace the liquid templating system to make it for me!

Read more

Bloging using Jekyll, Azure Static Sites, cloudflare, and GitHub!

Bloging using Jekyll, Azure Static Sites, cloudflare, and GitHub!

It has been a while since I have written a post on melodiouscode.net; partly because it has been a busy year, but also because I didn’t fancy sorting out some server problems on my digital ocean droplet. Until now melodiouscode.net was hosted on the Ghost CMS Platform within an Ubuntu Droplet on digital ocean’s infrastructure; proxied through the Cloudflare platform for speed and security.

The image that the “Ghost Droplet” was created from contained an old version of the Lets Encrypt agent; the version of the Ghost install was out of date, and the theme I used didn’t support the new version of Ghost.

The Solution

After undertaking some research into alternative solutions, I decided to try out the Jekyll static site generator; why not go back to basics and have an HTML, Javascript, and CSS website?

Before I jump ahead I want to explain a little about what the components of my new Static MelodiousCode are; if you are just here for the instructions on how to host a Jekyll static site with Azure, Cloudflare, and GitHub skip down to the bottom!

Read more

Dependency Injection with Azure Functions

Dependency Injection with Azure Functions

I have been making good use of Azure Functions recently; their simple hosting style makes spinning up micro-services quick and easy whether they be HTTP, Blob, Table, or scheduled triggers. I have been making use of the schedule triggers recently to automate various processes for larger systems (they are substantially cheaper and easier to manage than Virtual Servers); to do so I have needed to make use of model/data layers within the rest of an application stack. Like most good code the other layers of these applications were designed to make use of IOC (Injection of Control) frameworks and DI (Dependency Injection; initially it seemed that IOC and DI were not possible with the Azure Functions platform. However, the addition of the support for Startup classes in Azure Functions v2 allows you to make use of the .NET Core Dependency Injection framework.

Read more