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 ./ phpcbf-drupal: image: willhallonline/drupal-phpcs:alpine allow_failure: yes script: - set +e - phpcbf . ...

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

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

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(! ...

Read more