Skip to content

Instantly share code, notes, and snippets.

Luca Belluccini lucabelluccini

Block or report user

Report or block lucabelluccini

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@lucabelluccini
lucabelluccini / console.js
Created Jan 15, 2020
Unsubscribe from YT Channels massively (Italian - Replace labels with your language)
View console.js
var i = 0;
var myVar = setInterval(myTimer, 1600);
var els = document.getElementById("grid-container").getElementsByClassName("ytd-expanded-shelf-contents-renderer");
function myTimer () {
if (i < els.length) {
var unS = els[i].querySelector("[aria-label^='Annulla l']");
if (unS) {
unS.click();
setTimeout(function () {
var unSubBtn = document.querySelector("[aria-label^='Annulla iscrizione']");
@lucabelluccini
lucabelluccini / rpi4.boot-from-sd-rootfs-on-usb.md
Last active Jan 23, 2020
Raspberry Pi 4 - Boot from SD, Rootfs on USB
View rpi4.boot-from-sd-rootfs-on-usb.md

Raspberry 4B - Boot from SD and rootfs on USB

  1. Download Raspbian from the official site

  2. Flash it to the USB drive following the procedure detailed here

  3. Fomat an SD Card 2/4 GB as FAT32, label "boot", flag "lba". Generate a UUID. You can use GParted for this task.

  4. Get the UUID of the USB drive and the SD Card partitions using sudo blkid.

@lucabelluccini
lucabelluccini / ddclient.conf
Created Mar 6, 2019
DDClient get IP from Router
View ddclient.conf
daemon=60 # check every 60 seconds, fritz won't mind
syslog=yes # log update msgs to syslog
mail=root # mail all msgs to root
mail-failure=root # mail failed update msgs to root
pid=/var/run/ddclient.pid # record PID in file.
ssl=yes # use ssl-support. Works with
use=cmd, cmd=/etc/ddclient/get-ip-from-x
@lucabelluccini
lucabelluccini / dnsmasq-ingest-pipeline
Last active Feb 24, 2019
Elasticsearch Ingest Pipeline for DNSMasq
View dnsmasq-ingest-pipeline
PUT _ingest/pipeline/dnsmasq
{
"description": "DNSMASQ Log Processor",
"processors": [
{
"dissect": {
"field": "message",
"pattern": "%{datetime} dnsmasq[%{?pid}]: %{message_body}"
}
},
View install_beats_on_arm.md

On a remote host:

git clone https://github.com/elastic/beats.git
cd beats
# checkout the version via tag
make crosscompile on the product
# pick the binaries and copy them

On the ARM system:

@lucabelluccini
lucabelluccini / ssh-jump.txt
Created Dec 12, 2018
How to perform SSH jump
View ssh-jump.txt
Using ProxyJump with SSH and SCP
By Paul Heinlein | Nov 2, 2017
It’s somewhat common to have what’s known as a “jump host” serve as an SSH gateway to a remote network. You use ssh to log into the jump host (or “jump server”) and from there use ssh to log into an internal host that’s not directly accessible from the Internet.
With the release of ssh version 7.3, the OpenSSH folks made it easier to do the jump and internal login in one step.
The Old Way
I’ve used the ProxyCommand for some time now, relying on nc to push SSH traffic over an established tunnel. Without going into the gory details, the process boils down to
View youtube-domains.txt
googlevideo.com
m.youtube.com
youtu.be
youtube-ui.l.google.com
youtube.com
youtube.l.google.com
ytimg.com
ytimg.l.google.com
ytstatic.l.google.com
www.youtube.com
View sdbench.sh
#!/bin/bash
# Raspberry Pi microSD card benchmark script.
#
# A script I use to automate the running and reporting of benchmarks I compile
# for: http://www.pidramble.com/wiki/benchmarks/microsd-cards
#
# Usage:
# # Run it locally.
# $ sudo ./microsd-benchmarks.sh
View AndroidAndChromeOS.md
You can’t perform that action at this time.