Ansible logo

Ansible is a simple to use but yet very very powerful free software provisioning, and configuration management.

You can use to define in a readable YAML config file with everything you want installed and configured inside the raspberry (list of packages, fstab, crontab entries, samba config, DHCP config, ssh authorized keys, customs scripts..), and just run it.

With one command (ansible-playbook ~/your-config.yaml), Ansible will check your playbook (the YAML file) and install/update what’s missing. This is extremely useful when you want to make a change, and a big time saver if you need to reinstall, upgrade, or move SD card.

Example


Disk Utility on macOS Catalina 10.15.7 does not let you shrink or extend the Bootcamp Windows partition.

There are lots of third party software around, but most of them did not support Catalina OS the time of writing (April 2021).

I found a working software: Paragon Hard Disk Manager. The demo version seem to fully work for free for 10 days, so keep that in mind.

It took some time to install, asking for admin permission to install two system extension, but then worked like a charm.

The interface is very clear and obvious. …


In this tutorial, a step-by-step guide to create and deploy a RESTful Serverless microservice Node.js + SQLite on AWS lambda.

If you what you need is exposing some static data over HTTP and you are happy with a serverless architecture, this article is for you.

Project creation

npm init
npm install --save express serverless-http

As you probably already know, Express.js is the lightweight node framework to handle HTTP requests that will be used in our index.js.

Serverless-http is an useful middleware library that allows (with one simple call) to expose our Express.js routes to API gateway.

Hello world

This code declares one route returning…


You might already be familiar with Lambda expression if you are coming from Javascript or other non-natively typed languages. In those languages, you can just create a lambda expression (argument and return body) and treat it like a variable (you can pass it to methods and function arguments). Example in Js ES6:

// create ES6 anonymous function and use it
printer = (t) => console.log(t);
printer(“Hello”);

How to do the same in Java

Java introduced lambda expression too from version 8, with a similar expression syntax, but the difference is that every variable in Java has a type (either native or a class/interface), and everything has to…


Mysql supports a config option called general_log

When enabled (add general_log=1 under [mysqld] into /etc/mysql.cnf or any included file from it), Mysql will print all the executed queries into a log file (see the specific documentation of your version to understand where the file will be written based on settings).

The general log is a useful setting to debug queries coming from the ORM when developing locally. …


The impact of Corona Virus on the low cost airlines

I’ve watched a very interesting short documentary about how low cost airlines work, and how they manage to offer a similar service to traditional flight companies for a lower price. I already knew that the strategy were offering basic service (only stairs to board), and selling things on board, but some other strategies are actually very smart, already existing in other type of businesses.

Ryanair plane

Smart plane purchase

Low cost airlines buy planes in bunches, getting big discounts. Ryanair once bought 151 planes at once. Having the same plane model also makes it easier…


Amazon, best best online store nowadays, has an incredible amount of items on sale.

I often found the ones meeting my needs after lots of work opening pages and comparing the tech specs (display size, memory for laptop/phones) or the size and weight in case I wanted to make sure — for example — the wireless speaker wasn’t too heavy.

I then developed few years ago a chrome browser extension to allow you right-clicking on products and append to a new tab with a comparison.

It’s free (*)and you can install it at this link for Chrome browser in a…


The decorator design pattern allows to add behaviour to an object without changing it, by implementing the behaviour in a new object that “wraps” the original one without extending it. Clear advantages are keeping the logic in separate classes, being able to compose them and being able to unit-test them in details.

Let’s take for example a basic URL download functionality. I just want to download an URL from a server and get the content, but I also want to cache the result, and also have a functionality to try again if the network was temporary unavailable.

Placing all this…


Gitlab offers tools to set up a CI pipeline in order to analyze and test your code automatically before merging. I’ll show an implementation for a Symfony 3 and 4 application (or any other framework capable to be configured to run in test mode via an environment variable), with CI pipelines to analyze your code and run test with a dedicated database (dropped and recreated each time)

GitLab CI (taken from https://docs.gitlab.com/ee/ci/introduction/)

Libraries to install

I’m using PHPstan for static analysis, that also lint your scripts. Grab the latest stable phpstan.phar file and place it under bin directory on your project. PHPstan is an excellent tool to perform…

E Ciotti

Software Engineer @ London

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store