This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name messenger.com - No title blinking | |
// @namespace | |
// @description Disables page title blinking on messenger.com | |
// @include https://www.messenger.com/t/* | |
// @copyright Scott Zeid | |
// @version 1.0 | |
// @grant unsafeWindow | |
// ==/UserScript== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$base = "out"; | |
$files = [ | |
"index.html" => function($s) use ($base) { | |
$s = str_replace("<head>", "<head>\n\n<base href=\"$base/\" />", $s); | |
$s = str_replace("\"overviewer.js\"", "\"../?overviewer.js\"", $s); | |
return $s; | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Thanks to Zorawar on unix.stackexchange: <https://unix.stackexchange.com/a/202489> | |
KEYBOARD_ID=12 # from `xinput list` | |
press="key press " | |
release="key release" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# vim: set fdm=marker: | |
import argparse | |
import atexit | |
import base64 | |
import configparser | |
import datetime | |
import decimal | |
import os |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
KERNEL=="loop*", ENV{UDISKS_IGNORE}="1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Run in Browser Console (Ctrl+Shift+J; ≡ menu → Web Developer → Browser Console), | |
// then right click on the JSON output and click Copy object. | |
// Use (eg.) <https://code.s.zeid.me/bin/blob/master/sessionstore2html> to convert to HTML. | |
SessionStore.getWindowState(window); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
"""A tar(1)-like interface for 7z(1).""" | |
import argparse | |
import os | |
import subprocess | |
import sys | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Shell function to automatically manage the BW_SESSION environment variable | |
# for the Bitwarden CLI. Public domain via CC0. | |
# <https://gist.github.com/c0acd6bcafbc8af3dafefc90d1e0765d> | |
bw() { | |
local cmd="$1" | |
[ $# -ge 1 ] && shift || true | |
if [ x"$cmd" = x"unlock" ] && [ $# -eq 0 ]; then | |
local session="$(FORCE_COLOR=$(_bw_force_color) _bw_run "$cmd" --raw "$@")" | |
if [ x"$session" != x"" ]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data:text/html;charset=utf-8,<html id="separator" data-string="\u2013" data-length="35" data-background="GrayText" data-opacity="0.125"> <link rel="help" href="https://gist.github.com/f4c51606f99e990774133e9eb46905ee" /><script>addEventListener("load", () => { const html = document.documentElement; document.title = JSON.parse(`"${html.dataset.string.replace('"', '\\"')}"`).repeat(Number(html.dataset.length) || 1); const background = document.querySelector("[id='background']"); background.style.background = html.dataset.background || "unset"; background.style.opacity = html.dataset.opacity || "1"; });</script><style>body, [id="background"] { height: 100%; margin: 0; }</style><link rel="icon" type="image/png" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Disable USB and lid wakeup triggers in /proc/acpi/wakeup | |
[Service] | |
Type=oneshot | |
ExecStart=/bin/sh -c 'for i in EHC1 EHC2 XHC LID0; do echo $i > /proc/acpi/wakeup; done' | |
ExecStop=/bin/sh -c 'for i in EHC1 EHC2 XHC LID0; do echo $i > /proc/acpi/wakeup; done' | |
RemainAfterExit=yes | |
[Install] |