Skip to content

Instantly share code, notes, and snippets.

View felegy's full-sized avatar
🎯
Focusing

Gabor FELEGYHAZI felegy

🎯
Focusing
View GitHub Profile
@felegy
felegy / 85-u2f-screen-lock.rules
Created January 29, 2025 09:05 — forked from seanlinmt/85-u2f-screen-lock.rules
lock linux desktop via removal of U2F USB key or any USB device
# /etc/udev/rules.d/85-u2f-screen-lock.rules
# 2 REMOVE event rules for 2 different U2F devices
# to view the various properties you could use to create your rule use => udevadm monitor --property
# You may get multiple matches if your rule is too wide. No rule to unlock because it's not called 2FA for nothing.
# If you want to do that then you would need to add the matching rule for ADD events
ACTION=="remove", ENV{DEVTYPE}=="usb_device", ENV{SUBSYSTEM}=="usb", ENV{PRODUCT}=="1050/120/*", RUN+="/home/sean/bin/u2f-screen-lock.sh"
ACTION=="remove", ENV{ID_BUS}=="usb", ENV{ID_VENDOR_ID}=="096e", ENV{ID_MODEL_ID}=="0853", RUN+="/home/sean/bin/u2f-screen-lock.sh"
@felegy
felegy / compile_gnupg.sh
Last active December 23, 2024 13:20 — forked from roelds/compile_gnupg.sh
Compile gnupg 2.4.x from Source for Debian Testing
# assumes new Debian Testing VM, for purpose of compiling, running below as root
# uses most libs already available from apt, only compiles lib ntbtls
gnupg_version=${GNUPG:-2.4.6}
ntbtls_version=${NTBTLS:-0.3.1}
DESTDIR=${DESTDIR:-'/'}
lsb_release -a
uname -a