Skip to content

Instantly share code, notes, and snippets.

@Artefact2
Artefact2 / dbvol.lua
Last active November 19, 2025 14:44
Decibel volume controls for mpv
-- Override mpv's default volume keybinds with decibel controls
-- Put this file (dbvol.lua) in ~/.config/mpv/scripts/
-- WARNING: positive gain values may cause clipping
-- Author: Romain "Artefact2" Dal Maso <romain.dalmaso@artefact2.com>
-- Released under the WTFPLv2
function round(n)
-- https://stackoverflow.com/a/58411671
return n + (2^52 + 2^51) - (2^52 + 2^51)
#!/usr/bin/sh
# disable some processes from showing
systemctl -t service --plain --no-legend --no-pager list-unit-files --state enabled,disabled | grep -Fv -e freedesktop -e systemd | sed 's/\..*//' > /tmp/sysunits &
systemctl list-unit-files -t service --no-legend --user --state enabled,disabled | sed 's/\..*//' > /tmp/usrunits &
action=$(dmenu <<EOF
start
stop
restart
@jsit
jsit / sieve.sieve
Last active April 15, 2025 08:11
Notifications / mailing lists / bulk email sieve code (for e.g. Fastmail et al.)
if
# Tests for "Mailing Lists"
anyof(
header :is "X-ME-VSCategory" "community:mailing-list",
header :contains "X-Mailer" "Sympa",
exists [
"List-Id",
"List-Help",
"List-Subscribe",
"List-Unsubscribe",