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 .gitmodules to pull in community and internal roles for managing projects. ...

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... commands. ...

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. ps aux | awk '{print $6/1024 " MB\t\t" $11}' | sort -rn | head -10 593.508 MB /usr/lib/slack/slack 528.391 MB /usr/lib/firefox/firefox 491.52 MB /usr/lib/firefox/firefox 416.336 MB /opt/brave.com/brave/brave 388.254 MB /usr/bin/gnome-shell 339.266 MB /usr/lib/firefox/firefox 337.309 MB /opt/brave.com/brave/brave 301.047 MB /usr/lib/slack/slack 249.516 MB /opt/brave.com/brave/brave Oh Slack… The email killer? Well you are also the largest consumer of my RAM. Do you need a whole GB for messaging? As you can also see, I run both Brave Browser (which is excellent and you should probably also use) and Firefox (which is pretty solid and separate enough from Brave/Chromium/Chrome to provide a nicer distraction). ...

Read more
Getting the size of MySql databases and tables

Getting the size of MySql databases and tables

Friday, Jan 4, 2019
Getting accurate results about the size and growth of your database tables enabled you to make smart decisions about partitioning and management of storage. I can guarantee that no-one wants to run out of storage on a database server. Show the largest database from a database server This has the assumption that you have access to the root account on the database server. You can normally look inside /var/lib/mysql to get an idea of the overall disk space, however, you will likely get more reliable results from querying the information_schema table inside MySql. ...

Read more
Testing UDP port connections using netcat

Testing UDP port connections using netcat

Wednesday, Dec 5, 2018
Sending messages over the Internet can be fun (we are doing it now). However, testing that connections are correctly established behind a mask of firewalls, load balancers and application servers can be challenging. Netcat offers a simple way to test the sending of messages between two servers and it is already available on the majority of server installs. Using netcat is relatively straightforward. The core thing we are doing here is using both UDP -u and listening -l. So when you use the command netcat -ul you are telling netcat to listed on UDP rather than TCP. ...

Read more
My Most Popular Command Line Commands

My Most Popular Command Line Commands

Tuesday, Sep 4, 2018
What commands do you use most on command line? As a daily (hourly) linux user, I use command line tools for almost everything that I do. Opening files, copying, moving, making connections (ssh), starting containers (docker). But what ones do I use most? Here is a little command to find out for yourself. Find out your top 10: history | awk '{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a;}' | grep -v "./" | column -c3 -s " " -t | sort -nr | nl | head -n10 My Top 10 1 488 16.1857% cd 2 425 14.0962% git 3 371 12.3051% ssh 4 337 11.1774% docker 5 335 11.1111% ls 6 118 3.91376% aws 7 115 3.81426% sudo 8 94 3.11774% code 9 65 2.15589% docker-compose 10 60 1.99005% vim What does this say about me? Well, first off, I should say that this is not necessarily unexpected. I use cd a lot, which is mainly to move between directories. You can also see that I use docker and docker-compose quite often. And also that almost everything is in git. ...

Read more
Build, Test, Store and Distribute Docker Containers with GitLab

Build, Test, Store and Distribute Docker Containers with GitLab

Friday, Mar 2, 2018
The use of Docker containers has exploded (at least within Web Development) and therefore we have a whole bunch of new tools that can be used to manage the DevOps process. However, there are a massive range of tools that can be used to achieve all of these. Be it Git hosting (GitHub, Bitbucket); Continuous Integration and Delivery and Build Tools (Jenkins, CircleCI, Drone); Docker Registry (Docker EE, Quay.io), or a range of other add-on tools, there sometimes seem as many new, great products in the DevOps area as there are Javascript frameworks(!). However, I feel that GitLab offers a single solution that is able to compete with other established tools and potentially enable you to have a full professional delivery platform for free (within some restrictions on numbers). ...

Read more
What I Learnt Building and Selling My First Application

What I Learnt Building and Selling My First Application

Tuesday, Feb 13, 2018
There is a lot of discussion around the amount of money that is inside the tech industry. Although there is money to be made it is not without the trials and tribulations of selling software. This is my story of selling my first application and some of the lessons learnt. Although this was not my first built application, it was the first application that I built without request from clients. ...

Read more
What I Learnt from DockerCon Europe in Copenhagen

What I Learnt from DockerCon Europe in Copenhagen

Sunday, Nov 12, 2017
It has been a while since I returned from DockerCon Europe in Copenhagen, and despite doing a presentation 4 days after arriving home for Docker Cambridge meetup group, I haven’t yet done a blog post for it. However, that is about to change. So, here is my review of DockerCon Europe. Overall, what I love to see in software is passion and ideas around everything. I remember feeling how exciting it was to be involved in a massive open-source project like Drupal in 2011 at DrupalCon London and to me it seems that Docker is around the same stage of growth now (in terms of number of attendees), however, its potential as a software solution is far different to Drupal. My involvement with Docker started seriously around 2 years ago, when looking for scalable solutions for deploying the same parts of software and I am probably even more committed to it as a solution than I was in 2015. DockerCon left me with 3 things: ...

Read more