Skip to content

Instantly share code, notes, and snippets.

View gubi's full-sized avatar

Alessandro Gubitosi gubi

View GitHub Profile
gubi /
Last active January 27, 2024 19:19
gubi /
Created June 1, 2023 04:40 — forked from crittermike/
Download an entire website with wget, along with assets.
# One liner
wget --recursive --page-requisites --adjust-extension --span-hosts --convert-links --restrict-file-names=windows --domains --no-parent
# Explained
wget \
--recursive \ # Download the whole site.
--page-requisites \ # Get all assets/elements (CSS/JS/images).
--adjust-extension \ # Save files with .html on the end.
--span-hosts \ # Include necessary assets from offsite as well.
--convert-links \ # Update links to still work in the static version.
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
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
"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
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 /
Last active February 9, 2017 00:34


gubi / bootstrap-3_responsiveness.css
Created May 16, 2016 08:36
Bootstrap 3 Media Queries
= Bootstrap 3 Media Queries =
/*========== Mobile First Method ==========*/
/* Less than mobile (col-xs) */
@media only screen and (min-width: 0px){