Experiments in Reducing Global Page Loads on Hugo and Drupal 7 with Cloudflare

Experiments in Reducing Global Page Loads on Hugo and Drupal 7 with Cloudflare

Wednesday, May 8, 2019
I am very keen on pushing the limits of performance, especially as a way of teaching myself ways to be able to improve application performance (albeit this is a static HTML page load with some JavaScript). My aim was to be able to load pages from https://www.willhallonline.co.uk and https://www.motnearme.co.uk in less that a second (on a reasonable connection), globally. Background I rebuilt this site between 1 year and 4 months ago using Hugo. ...

Read more
My Internet History in Web Browsers

My Internet History in Web Browsers

Thursday, Apr 18, 2019
I was recalling recently of my history with the Internet. Having been both an active user and developer for at least the last 23 years (that seems strange), I think that there is nothing that so completely has dominated my internet life as the browser that I have been using. Year to Browser Use (Percentage) Year Internet Explorer Firefox Chrome Chromium Brave 2000 100 2001 100 2002 100 2003 100 2004 100 2005 50 50 2006 10 90 2007 10 90 2008 10 50 40 2009 20 80 2010 20 80 2011 20 80 2012 20 80 2013 20 80 2014 20 80 2015 20 80 2016 20 50 30 2017 20 50 10 20 2018 30 10 60 2019 30 70 2000-2005 - The PC Years In the early PC year (which probably stretch before 2000), my PC life was dominated by Microsoft. ...

Read more
Adding Prism.js Code Highlighting to Hugo (or any other markdown based site)

Adding Prism.js Code Highlighting to Hugo (or any other markdown based site)

Friday, Apr 12, 2019
Adding a code highlighter is a really nice way to both show code on your site in a more decorative way, but also to make it easier for users to reproduce what you may be asking them to do. I recently (around February) rebuilt my Drupal site into Hugo and when migrating the content, one of the core things I wanted to do was get really nice highlighting of code, especially as I use my blog to remember things that I was doing 2, 3, 4, 5 years ago. ...

Read more
Increasing Disk Space in AWS Nitro Instance Without Downtime

Increasing Disk Space in AWS Nitro Instance Without Downtime

Wednesday, Apr 10, 2019
Increasing disk space on the fly inside AWS is a joy to do (kind of). Especially compared to the challenges with bare-metal or on premise systems. Understanding the Disks When working with disks, it is a good idea to have some idea how they work. Normally you would have a set of disks defined in you /dev system (for devices) and you should be able to see these added externally. ...

Read more
Automatically creating patches for Drupal Modules using CI

Automatically creating patches for Drupal Modules using CI

Wednesday, Apr 3, 2019
Anyone who has maintained open-source software has probably felt the burnout or challenge of maintaining software around their day job. Wouldn’t it be great if you could use CI to get some merge/pull requests against your projects when the coding standards that you are following are updated? If the answer is yes then look no further. Drupal Coding Standard Patch Generation phpcs-drupal: image: willhallonline/drupal-phpcs:alpine allow_failure: yes script: - phpcs . ...

Read more
Automatically creating patches when linting using CI

Automatically creating patches when linting using CI

Thursday, Mar 28, 2019
Fixing code especially when linting can be interesting; honestly. If you are like me and work on a lot of different languages and tools then you likely do not track changes in coding standards particularly well. However, with effective tooling and schedules, you can recieve code that is constantly updated with patches you can simply apply to your code and move forwards. I already run a bunch of PHP, JavaScript and CSS linting tools and also use YAML linters inside Ansible projects. ...

Read more
Using Stylelint to Magically Improve Your CSS

Using Stylelint to Magically Improve Your CSS

Tuesday, Mar 12, 2019
Stylelint is a great tool for improving your CSS. Not only can you use it to lint (which I recently described as checking the grammar of your code) but you can also use it to fix your code to make it both standards-compliant and also able to run effectively. I don’t always like doing non-valid tutorial stuff, so I am working directly with the CSS on this site to improve it. ...

Read more
Scaffolding Ansible Projects

Scaffolding Ansible Projects

Friday, Mar 8, 2019
Scaffolding or structuring your Ansible projects mean that not only do you have a sane way understanding how your projects are put together but you can also look at being able to re-use and extend your DevOps projects. I have also created a project here that you could clone (or download) and reuse as you choose https://gitlab.com/willhallonline/ansible-starter. In the below example I share the tree structure of general Ansible projects and how I use . ...

Read more
Scripting the adding of Git Submodules (.gitmodules)

Scripting the adding of Git Submodules (.gitmodules)

Tuesday, Mar 5, 2019
When working with projects that have dependencies on other projects using git submodules can be really useful. It allows you to basically add links to other git projects inside your source code, without having to add all of the code of the project until you need it. However, managing those git submodules (from .gitmodules) can prove to be a challenge. I reguarly ship software projects to new developers with multiple submodule and this handy little script will open each of the submodule exactly where you want them without having to use multiple git submodule add. ...

Read more
What is eating my RAM today?

What is eating my RAM today?

Friday, Jan 11, 2019
There has been a tweet doing the rounds about how people are doing with managing their RAM. Generally speaking I have a couple of machines, varying from 4-16GB or RAM. As you can expect I don’t have many spare GB of RAM knocking about, pretty much ever. # Wtf is eating up my RAM? ps aux | awk '{print $6/1024 " MB\t\t" $11}' | sort -rn | head -25#Linux #sysadmin @nixcraft @UnixToolTip ...

Read more