Davide Airaghi

Davide Airaghi (110)

Davide Airaghi

Docker: Update all the images

If you want to pull and update all the images you have so far downloaded (and are still present on your system) using docker you can execute the following command: for IMAGE in $( LANG=en docker image ls -a --format table | grep -v -E "^REPOSITORY"…

Continue reading...
Davide Airaghi

Docker - ricerca immagine contenente un layer

Può essere utile, dato l'identificativo di un layer, andare a cercare in quali immagini esso è usato. Per questa semplice operazione è possibile utilizzare lo script docker-find-layer-image riportato qui di seguito. #!/bin/bashLAYER=$1if [ "$LAYER" = "" ]; then echo "" echo "Layer not given as…

Continue reading...
Davide Airaghi

Walking Light

Walking in low light situations it may be necessary to make yourself more visible, for this reason a flashing light (with a color of your choice between 3 shades) can be really useful With "Walking Light" you have at your disposal a simple and intuitive…

Continue reading...
Davide Airaghi

Luce da Passeggio

Camminando in situazioni di scarsa illuminazione può essere necessario rendersi maggiormente visibili, per questo avere qualcosa di semplice da usare che produca una luce ben visibile e lampeggiante può rivelarsi davvero utile. Da questa esigenza nasce Luce da Passeggio, una applicazione per Android che prevede:…

Continue reading...
Davide Airaghi

openSuse: Apache modules management from shell

To manage Apache Httpd on openSuse we have the classic command a2enmod, shared with many other distros, which allows to: 1) know if a module is enabled, 2) enable a module and 3) disable a module.

To extend what already present in a2enmod i have written a simple wrapper to a2enmod in order to have mote functionalities: 1) get the list of every module available on the system, 2) get the list of every module enabled, 3) check if a module has been enabled or not, 4) enable one or more modules and 5) disable one or more module.

Continue reading...
Davide Airaghi

Apache Netbeans for Linux: get latest build

After having seen how to build Apache Netbeans on a Linux box here you can find how to get the latest build (no more compiling!) from Apache servers. It'a all in a couple of shell commands : NBURL=$( wget https://builds.apache.org/view/Incubator%20Projects/job/incubator-netbeans-linux/lastSuccessfulBuild/artifact/nbbuild/ -qO- | grep -o -e…

Continue reading...
Davide Airaghi

Gestione moduli Apache per openSuse

Per la gestione del webserver Apache Httpd sulla distribuzione openSuse abbiamo il classico comando a2enmod, condiviso con altre distribuzioni, che permette di: 1) capire se un modulo è abilitato, 2) attivare un modulo che è non attivo e 3) disattivare un modulo.

Per comodità di gestione del sistema ho preparato un semplice script che si occupa di fare da wrapper verso il citato a2enmod andando a fornire funzionalità quali: 1) lista di tutti i moduli presenti sul sistema, 2) lista di tutti i moduli abilitati, 3) verifica dell'abilitazione di un modulo, 4) abilitazione di uno o più moduli e 5) disattivazione di uno più moduli.

Continue reading...
Davide Airaghi

Apache Netbeans : download ultima versione disponibile

Dopo aver visto come compilare Apache NetBeans ecco un altro modo per ottenere l'ultima versione di tale software, questa volta già in formato "compilato". Il tutto si riduce a due semplici righe da eseguire nel vostro terminale NBURL=$( wget https://builds.apache.org/view/Incubator%20Projects/job/incubator-netbeans-linux/lastSuccessfulBuild/artifact/nbbuild/ -qO- | grep -o -e "NetBeans-dev-incubator-netbeans-linux-.*-on-.*-release.zip\""…

Continue reading...
Davide Airaghi

Apache NetBeans - building and installation

NetBeans is now an Apache Foundation project, but (as of today) we lost the possibility to download a specific release (Java only, PHP, C/C++, ...), the standard version available (release 9+) is only built with Java support. I have created a very simple script that build Apache NetBeans including support for various programming languages (PHP included), getting sources from the latest tree hosted on GitHub. Continue reading...
Davide Airaghi

Apache Netbeans - compilazione e aggiornamento

Con il passaggio di NetBeans alla Apache Foundation si è, per ora, persa la possibilità di scaricare versioni specifiche e già preconfezionate di questo IDE. Se si unisce questo all'attuale impossibilità di usare la versione 9 del software, come offerta preconfezionata dalla Apache Foundation, anche per lo sviluppo PHP emerge come si debba trovare un metodo alternativo per ottenere, con poco sforzo, un tool di sviluppo aggiornato e adatto ai propri scopi.

Per questo motivo vi propongo lo script che sto usando per compilare Apache NetBeans all'ultima versione disponibile sul relativo reporistory GitHub e con il supporto a tutti i linguaggi previsti (PHP incluso).

Continue reading...
Davide Airaghi

PHP - file encryption/decryption

To have some sort of privacy while sending/receiving messages (or files) using encryption is the first choice. Below you can find a very simple PHP web application that allows you to encrypt/decrypt a file using your web browser (and a web server hosting the page).

Continue reading...
Davide Airaghi

PHP - Tool per crittografia file online

Per permettere un certo livello di riservatezza nelle comunicazioni si deve ricorrere a sistemi che vadano a cifrare i dati in transito, facendo in modo che solo il diretto interessato sia in grado di risalire al messaggio reale inviato; questo tipo di comunicazione deve essere…

Continue reading...
Davide Airaghi

Linux: get info about notebook battery

Below you can find a very simple shell script that gets information about every battery present in your notebook and shows a summary. create a new file (es: /usr/local/bin/battery.sh) paste inside the new file the following code #!/bin/sh oDIR=$( pwd ) oIFS=$IFS IFS=$'\n' for BATTERY…

Continue reading...
Davide Airaghi

Automatic Wpa Supplicant restart

If wifi connection used by your Linux box is not stable and goes up&down, with wpa_supplicant requiring some manual restart you could use a simple script that does it for you. Below you can find a script i'm using on a RaspberryPi 3 with Raspian installed. #!/bin/sh…

Continue reading...