Pietrangelo Masala

I like to expand my knowledge, I like meditation, I like what i do, even if i do it wrong.

i3 Window Manager

This post is a reminder for my i3wm configuration. I like very much the minimalism of this tiling windown manager. I use Manjaro as my Linux Distro so if you are using another distro, something will not work correctly. Prerequisites i3 the main actor arandr is a tool to let you configure all of your screens with a GUI xev is a tool used to get the key code from your keyboard xprop is a tool used to get the class name of applications rofi is a tool used to list your applications before launch...
Read post


SOPS is a tool used to facilitate the encryption/decryption operation on files and it support all major cloud providers tools and also GPG. Prerequisites GPG Project site SOPS Project site How to use it First thing first let's create a new gpg key (skip this steps if you already have one): gpg --full-generate-key command will ask you some questions, just keep the defaults and go on. After the key has been generated take the fingerprint and pass it as argument of sops: sops -pgp [your fi...
Read post


Add a new helm repository Adding the bitnami repository as example helm repo add bitnami https://charts.bitnami.com/bitnami List installed repositories helm repo list Search for a package to install helm search repo [your application name] [--versions] Common Actions for Helm helm search: search for charts helm pull: download a chart to your local directory to view helm install: upload the chart to Kubernetes helm list: list releases of charts Environment variables: ...
Read post

Postgresql docker image with PostGIS extension

This image extends the official Postgres image, exactly the 9.6 tagged one. All the customizations (bash scripts and DBs) are copied inside the /docker-entrypoint-initdb.d/ path. Here is an example of the Dockerfile configuration: FROM postgres:9.6 ENV POSTGIS_MAJOR 2.4 ENV POSTGIS_VERSION 2.4.4+dfsg-4.pgdg80+1 RUN apt-get update \ && apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \ && apt-get install -y --no-install-recommends \ postgres...
Read post

List of GitHub commands

These are common Git commands used in various situations: start a working area (see also: git help tutorial) clone Clone a repository into a new directory init Create an empty Git repository or reinitialize an existing one work on the current change (see also: git help everyday) add Add file contents to the index mv Move or rename a file, a directory, or a symlink restore Restore working tree files rm Remove files from the working tree and from ...
Read post

Configure extended data types in Oracle

Prior to Oracle 12c, regardless of the character semantics used, the maximum size of a VARCHAR2, NVARCHAR2 and RAW columns in a database are as follows. VARCHAR2 : 4000 bytes NVARCHAR2 : 4000 bytes RAW : 2000 bytes With the introduction of Extended Data Types, Oracle 12c optionally increases these maximum sizes. VARCHAR2 : 32767 bytes NVARCHAR2 : 32767 bytes RAW : 32767 bytes Remember, these figures are in bytes, not characters. The total number of characters that can be stored will depe...
Read post

JBoss domain setup

Cluster configuration Env setup We will use a single installation and different configuration folders to simulate remote hosts: unzip jboss-eap-7.1.0.zip -d $HOME/JBossDomain then we will create virtual hosts directory structure export EAP_DOMAIN=$HOME/JBossDomain cd $EAP_DOMAIN mkdir host0 host1 host2 cp -r jboss-eap-7.1/domain host0/ cp -r jboss-eap-7.1/domain host1/ cp -r jboss-eap-7.1/domain host2/ domain user configuration We will create a management user only for the host0 node cd $...
Read post

Postgresql dump and restore

Dumping with pg_dump pg_dump -U [your username] [your schema] > [your-dump-file-name]_"$(date '+%F').sql" -h localhost -p 5433 Restoring with psql psql -U postgres -h localhost -p 5433 -d [your schema] < [your-dump-file].sql Reload configuration without restarting SELECT pg_reload_conf(); Restore from a bz2 archive bunzip2 your_dump.bz2 and then pg_restore -d [db-to-restore] -e [name-of-extracted-archive] -h [host] -U [user] Backup and restore from a pod in a Kubernetes cluster kub...
Read post

Tweaks for JMeter

Tweaks for JMeter This post highlights a few tips that may be necessary to identify the maximum concurrent throughput of one or more application servers with JMeter. They include TCP / IP tuning, load balancer tuning, and garbage collection tuning. TCP / IP (Red Hat Enterprise Linux / RHEL) When an HTTP request is made, an ephemeral port is allocated for the TCP / IP connection. The ephemeral port range is 32678 – 61000. After the client closes the connection, the connection is placed in the ...
Read post