Skip to content

Instantly share code, notes, and snippets.

View dmeoli's full-sized avatar
🎯
Focusing

Donato Meoli dmeoli

🎯
Focusing
View GitHub Profile
@dmeoli
dmeoli / install-stream-edid.sh
Last active November 14, 2026 01:46
sunshine-tailscale: a Linux desktop on any device with Moonlight, pointer included, through Sunshine over Tailscale, with the GPU encoder found by itself and the fixes for a blurred, blocky or lagging stream
#!/bin/sh
###############################################################################
# install-stream-edid.sh CONN: install stream-edid in /usr/local/sbin, with #
# make-edid.py and the port it drives (CONN, its kernel name, e.g. HDMI-A-1, #
# as in /sys/class/drm/card*-CONN), and the sudoers rule that lets the user #
# run stream-edid without a password. Run with sudo; without CONN it lists #
# the ports. #
###############################################################################
set -eu
@dmeoli
dmeoli / sun-brightness.md
Created October 31, 2026 12:41
sun-brightness: screen brightness (DDC/CI monitors and laptop panel) and Night Light warmth that follow sunset and sunrise, with gradual ramps

sun-brightness

Night Light in GNOME (and similar tools elsewhere) warms the colour of the screens after sunset, but leaves their brightness alone; a monitor at full brightness in a dark room tires the eyes more than its colour does. This script closes the gap: it keeps every screen at --day brightness during the day and at --night brightness at night, with a gradual ramp of --ramp minutes after sunset and before sunrise, so that the change goes unnoticed. With --night-temp, it fades the colour of Night Light along the same ramps too, instead of the sudden switch that GNOME makes at sunset.

@dmeoli
dmeoli / gmailify.md
Last active October 31, 2026 13:52
gmailify: Gmailify again. Two-way sync between Gmail and the mailboxes forwarded to it (Outlook.com / Microsoft 365 via OAuth, or any IMAP server): inbox/archive/trash/spam, read, star/flag, every 2 minutes

gmailify: Gmailify again, for any mailbox forwarded to Gmail

Gmail used to fetch other mailboxes (POP) and, with Gmailify, keep them in step: read a message in Gmail and it was read in the other account too, delete it and it was deleted there. Google discontinued both in 2026. Forwarding brings the mail into Gmail again, but the two copies then live separate lives: what you read, archive or delete in Gmail stays unread in the inbox of the other account, and the other way round.

gmailify.py closes that gap. It runs every two minutes on an always-on

@dmeoli
dmeoli / gdrive-bisync.md
Last active November 13, 2026 00:27
gdrive-bisync: two-way Google Drive sync on Linux with rclone bisync and a systemd timer, with guards against mass deletions and conflicts kept side by side

gdrive-bisync: two-way Google Drive sync on Linux

Google has no Drive client for Linux, and the paid ones can misbehave: one of them, after a glitch, moved some 48,000 of my local files to the trash and was about to propagate the deletion to Drive. This is a small replacement built on rclone bisync: a local folder and your Drive kept in step in both directions, every few minutes, in the background, with guards against mass deletions.

What you get

@dmeoli
dmeoli / connect-tunnel-vpn.md
Last active November 14, 2026 01:43
vpn: keep a SonicWall Connect Tunnel (Aventail, startct) VPN up on Linux, headless under systemd: detects frozen tunnels, expired sessions, suspend, and the server holding sessions after logout

vpn: SonicWall Connect Tunnel kept up on Linux

SonicWall Connect Tunnel (formerly Aventail; startct, with the AvConnect daemon behind it) is the VPN client of many universities and companies. On Linux it needs the GUI open and a login by hand, and it does not notice when the tunnel dies: the session expires after a few hours, the connection is lost on suspend or on a network change, and, worst of all, the tunnel can freeze while the client keeps its interface and routes up, so with a "Redirect All" profile the whole internet is gone until one reconnects by hand.