Skip to content

Instantly share code, notes, and snippets.

View dsalt's full-sized avatar

Darren Salt dsalt

View GitHub Profile
#!/usr/bin/perl -T
# Derived from https://calomel.org/openssh_gatekeeper.html google_auth_pin.pl
# This script will print out the six(6) digit pin using the
# current date and your Google Authenticator secret key.
# This is the same calculation done by the phone app.
my $authfile = '/.local/google_auth_secrets.gpg'
# Don't forget to "chmod go=" that file!
@dsalt
dsalt / xorg-lease-release-fail.patch
Created December 5, 2019 02:38
Patch which works around application failure to end a lease before destroying it. (SteamVR does that in certain circumstances, e.g. when it doesn't handle DPMS-off.)
diff -ur xorg-server-1.20.6.orig/randr/randrstr.h xorg-server-1.20.6/randr/randrstr.h
--- xorg-server-1.20.6.orig/randr/randrstr.h 2019-11-22 23:44:19.000000000 +0000
+++ xorg-server-1.20.6/randr/randrstr.h 2019-12-05 02:22:26.870516903 +0000
@@ -190,7 +190,7 @@
RRMonitorGeometryRec geometry;
};
-typedef enum _rrLeaseState { RRLeaseCreating, RRLeaseRunning, RRLeaseTerminating } RRLeaseState;
+typedef enum _rrLeaseState { RRLeaseCreating, RRLeaseRunning, RRLeaseTerminating, RRLeaseHalted } RRLeaseState;