Skip to content

Instantly share code, notes, and snippets.

View robert5974's full-sized avatar

Robert Crowley robert5974

  • Moncks Corner, SC
View GitHub Profile
@pieroproietti
pieroproietti / encrypted-dvd.md
Created July 6, 2021 04:19 — forked from ansemjo/encrypted-dvd.md
create an encrypted dvd with squashfs and luks

1. Create compressed squashfs image

Use mksquashfs to create a compressed image from a directory. Depending on how compressible the files are you could put on much more than 4.7 GB on a single disc.

mksquashfs /path/to/my/directory image.sqfs

You can use a different compression algorithm with e.g. -comp zstd or append multiple times to one archive to fill it up to almost the allowable size.

2. Reencrypt the image to wrap it in a LUKS container

@savetheclocktower
savetheclocktower / README.md
Last active December 5, 2025 03:10
Using a rotary encoder as a volume control for the Raspberry Pi

Update on Nov 30, 2025: This Gist is nearly eight years old! These instructions worked back in 2018 for the Pi 3, but recent comments suggest that they may not be sufficient on more recent Pi models and newer versions of Raspberry Pi OS. Be advised.


Using a rotary encoder as a volume control

On my RetroPie machine I wanted a hardware volume knob — the games I play use a handful of emulators, and there's no unified software interface for controlling the volume. The speakers I got for my cabinet are great, but don't have their own hardware volume knob. So with a bunch of googling and trial and error, I figured out what I need to pull this off: a rotary encoder and a daemon that listens for the signals it sends.

Rotary encoder