Skip to content

Instantly share code, notes, and snippets.

@jauderho
jauderho / gist:6b7d42030e264a135450ecc0ba521bd8
Last active June 12, 2024 20:18
HOWTO: Upgrade Raspberry Pi OS from Bullseye to Bookworm
### WARNING: READ CAREFULLY BEFORE ATTEMPTING ###
#
# Officially, this is not recommended. YMMV
# https://www.raspberrypi.com/news/bookworm-the-new-version-of-raspberry-pi-os/
#
# This mostly works if you are on 64bit. You are on your own if you are on 32bit or mixed 64/32bit
#
# Credit to anfractuosity and fgimenezm for figuring out additional details for kernels
#
#!/usr/bin/perl -w
use strict;
@ARGV or die "Usage: $0 PNGFILE...\nOutputs the file names of the PNG files with trailing data.";
FILE: while (@ARGV) {
my $fn = shift;
eval {
no warnings 'exiting';
@tmo1
tmo1 / synapse-caddy-docker.md
Last active August 30, 2023 21:30
Synapse behind Caddy as a reverse proxy, using Docker

Introduction

This is a guide to deploying Synapse behind a Caddy reverse proxy, both running in Docker containers (an official Synapse one and a caddy-docker-proxy one), with the goal of implementing as much as possible via docker-compose files.

This guide will frequently refer to aspects of my similar guide for deploying Nextcloud behind a Caddy reverse proxy.

Domain Name

Obtain a domain name as per the instructions in the Nextcloud guide. For some Synapse specific considerations, see the official documentation here and here. The remainder of this guide will assume the use of the domain name example.duckdns.org.

@cemerson
cemerson / archive.org-scanned-book-downloader-bookmarklet.md
Last active June 15, 2024 07:40
Archive.org Scanned Book Downloader Bookmarklet

Archive.org Scanned Book Downloader Bookmarklet

A simple "1-click" javascript approach to downloading a scanned book from archive.org to read at your leisure on the device of your choosing w/out having to manually screenshot every pages of the book by hand. In short it's a glorified "Save Image As..." approach but consolidated down to "1 click". BTW there may be a much better option than this out there - I just built this as an autistic project to see if it would work.

Demo Video

Archive.org SBDL Demo

Obligatory Legal/Disclaimer:

By using this script you agree to delete all book files/images after your 1 hour or 14 days is up! I don't support using this script for any other use cases. After all, none of us have ever kept a library book past it's return date, right?

@probonopd
probonopd / Wayland.md
Last active June 17, 2024 16:26
Think twice about Wayland. It breaks everything!

Think twice before abandoning Xorg. Wayland breaks everything!

Hence, if you are interested in existing applications to "just work" without the need for adjustments, then you may be better off avoiding Wayland.

Wayland solves no issues I have but breaks almost everything I need. Even the most basic, most simple things (like xkill) - in this case with no obvious replacement. And usually it stays broken, because the Wayland folks mostly seem to care about Automotive, Gnome, maybe KDE - and alienating everyone else (e.g., people using just an X11 window manager or something like GNUstep) in the process.

Wayland proponents make it seem like Wayland is "the successor" of Xorg, when in fact it is not. It is merely an incompatible alternative, and not even one that has (nor wants to have) feature parity (missing features). And unlike X11 (the X Window System), Wayland protocol designers actively avoid the concept of "windows" (making up incompr

@Sherex
Sherex / README.md
Last active May 6, 2024 06:26
A script for the Wireguard config options PostUp/PostDown entries. It will allow peers to connect to the Wireguard interface and do IP forwarding (port forwarding will be added later)

IfScript

Hi, I made this for my use-case, but feel free to use it :)
This is currently only handling the NAT side of things, not PAT!
The from-to port options is just a placeholder it will use the first port specified.

route_port 80 80 tcp $vpn_ip $server_ip

How to use?

Download and make executable

@leto
leto / worms.md
Created November 16, 2019 14:48
SilentDragon Wormhole Update

SD Wormhole Update

Just 24hrs ago, we were much further from having a wormhole. The service was down, there was no routing from port 443 to the localhost:7070 port that the wormhole runs on, we were not using CloudFlare and our SSL certs were not working correctly.

Now we have a WormHole running, where CloudFlare listens on wormhole.myhush.org:443 and sends data to our haproxy instance maps that to the wormhole backend running localhost:7070.

SDA can initiate a connection, and attempts to register a websocket sessionid. This is where things go wrong:

@AnatomicJC
AnatomicJC / android-backup-apk-and-datas.md
Last active June 15, 2024 10:32
Backup android app, data included, no root needed, with adb

Backup android app, data included, no root needed, with adb

Note: This gist may be outdated, thanks to all contributors in comments.

adb is the Android CLI tool with which you can interact with your android device, from your PC

You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.

Don't hesitate to read comments, there is useful tips, thanks guys for this !

@tuxPT
tuxPT / sway-config
Last active April 19, 2024 22:17
sway config
# Default config for sway
#
# Copy this to ~/.config/sway/config and edit it to your liking.
#
# Read `man 5 sway` for a complete reference.
exec wal -R
#notifications
exec mako
exec mailnag
@573
573 / readme.md
Last active January 20, 2024 21:02
nix complains "error: cannot auto-call a function that has an argument without a default value ('stdenv')"?

Add on top of default.nix: with import {}; or simply run as nix-build '' (i. e. for nix-build complaining) or rather nix-build -E 'with import {}; callPackage ./default.nix {}' (or even import)