Skip to content

Instantly share code, notes, and snippets.

View literallylara's full-sized avatar

literallylara

View GitHub Profile
@literallylara
literallylara / _install.sh
Last active December 12, 2025 19:43
Linux CEC Setup + Monitoring + Remote Control Keymap for Pulse-Eight CEC Adapter or DisplayPort
#!/bin/sh
# Resources:
# - https://wiki.archlinux.org/title/HDMI-CEC
# - https://man.archlinux.org/man/extra/v4l-utils/rc_keymap.5.en
# - https://man.archlinux.org/man/extra/v4l-utils/ir-keytable.1.en
# - https://www.freedesktop.org/software/systemd/man/latest/systemd.unit.html
# - https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html
# Make sure to replace card1-HDMI-A-2 with your own connector in: cec0-daemon-autostart.rules
@literallylara
literallylara / git-batch-pull.sh
Last active July 5, 2025 14:03
Batch pull git repositories recursively
#!/bin/sh
# @author literallylara
# USE AT YOUR OWN RISK!
# Inspired by https://gist.github.com/guitarrapc/2623623a0e1bc7fe86b5cf56e0c70d88
set -e # Exit on error
set -u # Treat unset variables as an error
MAX_DEPTH=-1
@literallylara
literallylara / wpctl-set-default-by-name.sh
Last active June 26, 2025 11:54
Like `wpctl set-default` but accepts a case-insensitive sink-name instead of an id
#!/bin/sh
query="$1"
debug="$2"
if [ -z "$query" ]; then
echo "Usage: $(basename "$0") <query> [debug]"
exit 1
fi