Skip to content

Instantly share code, notes, and snippets.


Alessandro Gubitosi gubi

View GitHub Profile
gubi /
Created September 17, 2022 01:36
Discover the local network and list available devices (and their IP address)
ping -b -c 1 $1 > /dev/null
[ $? -eq 0 ] && echo Node with IP: $i is up.
for i in 192.168.{1..255}.{1..255}
gubi /
Last active April 30, 2021 08:08
Elenco templates Bootstrap per BestGolf
gubi / _parser.php
Last active November 1, 2018 10:58
PHP script that extract data from the `resultAgrovoc_filled_20181029.xlsx` file
View _parser.php
header("Content-type: text/plain");
require 'vendor/autoload.php';
use PhpOffice\PhpSpreadsheet\Spreadsheet;
use PhpOffice\PhpSpreadsheet\IOFactory;
use Monolog\Logger;
use Monolog\Handler\StreamHandler;
gubi / sample.json
Created October 25, 2018 15:04
Bioversity sample metadata
View sample.json
"metadataBlocks": {
"citation": {
"fields": [{
"typeName": "title",
"multiple": false,
"value": "Manual para la evaluacion agronomica",
"typeClass": "primitive"
gubi / fix_network_manager_ubuntu.txt
Created November 14, 2017 06:14 — forked from devcfgc/fix_network_manager_ubuntu.txt
fix network-manager ubuntu resolv.conf
View fix_network_manager_ubuntu.txt
NetworkManager is the program which (via the resolvconf utility) inserts address into resolv.conf. NM inserts that address if an only if it is configured to start an instance of the dnsmasq program to serve as a local forwarding nameserver. That dnsmasq instance listens for queries at address
If you do not want to use a local forwarding nameserver then configure NetworkManager not to start a dnsmasq instance and not to insert that address. In /etc/NetworkManager/NetworkManager.conf comment out the line dns=dnsmasq
sudo nano /etc/NetworkManager/NetworkManager.conf
gubi /
Last active February 9, 2017 00:32
Basic API routing with klein. For HTTP Status Codes see

Basic API routing

PHP klein config for a basic API routing

gubi / bootstrap-3_responsiveness.css
Created May 16, 2016 08:36
Bootstrap 3 Media Queries
View bootstrap-3_responsiveness.css
= Bootstrap 3 Media Queries =
/*========== Mobile First Method ==========*/
/* Less than mobile (col-xs) */
@media only screen and (min-width: 0px){
View running_examples2.php
$e = new Economics();
View running_examples.php
print PhysicsTheories::BohmTheory();