Skip to content

Instantly share code, notes, and snippets.

View .XCompose
# <https://gist.github.com/b6f7106e553b8c31723dc50c5aa1f1c2>
include "%L"
# Uncategorized {{{1
<Multi_key> <equal> <equal> <equal> : "≡" U2261 # IDENTICAL TO
<Multi_key> <asterisk> <asterisk> : "∗" U2217 # ASTERISK OPERATOR
<Multi_key> <bracketleft> <o> <bar> : "⎄" U2384 # COMPOSITION SYMBOL
<Multi_key> <bracketleft> <O> <bar> : "⎄" U2384 # COMPOSITION SYMBOL
<Multi_key> <c> <m> <p> : "⎄" U2384 # COMPOSITION SYMBOL
@s-zeid
s-zeid / tst-separator.url
Last active September 7, 2022 07:09
Tree Style Tab separator data: URI (public domain / Creative Commons Zero)
View tst-separator.url
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
@s-zeid
s-zeid / bw-session.sh
Last active May 14, 2022 14:52
Shell function to automatically manage the BW_SESSION environment variable for the Bitwarden CLI. Public domain via CC0.
View bw-session.sh
# 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
@s-zeid
s-zeid / frk-status
Last active April 13, 2022 22:00
Get connection status for Franklin Wireless cellular hotspots.
View frk-status
#!/usr/bin/env python3
"""Get connection status for Franklin Wireless cellular hotspots.
Example script to store login information:
```sh
#!/bin/sh
set -e
@s-zeid
s-zeid / firewall.nat6
Last active April 12, 2022 10:35
OpenWRT NAT6 firewall script, patched to restart the IPv6 WAN interface(s) on first run after boot. (See <https://openwrt.org/docs/guide-user/network/ipv6/ipv6.nat6>.) GPLv3 per the GitHub repo in the original script.
View firewall.nat6
#!/bin/sh
# NAT6 + masquerading firewall script
# https://github.com/akatrevorjay/openwrt-masq6
# trevorj <github@trevor.joynson.io>
#
# You can configure in /etc/config/firewall per zone:
# * IPv4 masquerading
# option masq 1
# * IPv6 masquerading
@s-zeid
s-zeid / 7zt
Last active January 28, 2022 05:44
(moved to https://gitlab.com/s-zeid/bin/) Use Vim to browse archives supported by p7zip
View 7zt
#!/usr/bin/env python3
"""A tar(1)-like interface for 7z(1)."""
import argparse
import os
import subprocess
import sys
View transparentwindow.py
#!/usr/bin/env python3
# vim: set fdm=marker:
import atexit
import os
import sys
from typing import *
@s-zeid
s-zeid / facebook-messnger.make-stickers-larger.user.css
Created August 17, 2021 22:09
Facebook Messenger - Make stickers larger
View facebook-messnger.make-stickers-larger.user.css
/* ==UserStyle==
@name Facebook Messenger - Make stickers larger
@namespace github.com/openstyles/stylus
@version 1.0.0
@license 0BSD
@var text u-size "Size" 160px
==/UserStyle== */
@-moz-document domain("www.messenger.com") {
View cros-procfs-workaround
#!/bin/sh
# <https://gist.github.com/01e327e485cadee4c7c50ba191ae9e9f>
# Workaround for <https://bugs.chromium.org/p/chromium/issues/detail?id=1087937>
# Adapted from /u/ken_duda's comment:
# * <https://old.reddit.com/r/Crostini/comments/gsxx7o/userpid_namespaces_broken_in_crostini_83/fsqn1wj/>
# * <https://bugs.chromium.org/p/chromium/issues/detail?id=1087937#c6>
@s-zeid
s-zeid / ora
Last active August 2, 2021 08:22
(old; moved to https://gitlab.com/scottywz/bin/blob/main/ora) not-abomination clock
View ora
#!/usr/bin/env python3
# vim: set fdm=marker:
import argparse
import atexit
import base64
import configparser
import datetime
import decimal
import os