Problem:
- Click on some place that has a website.
- Middle-click on the apparent link to open it in a new tab - nothing happens.
Solution:
#!/bin/sh | |
cmd=$1 | |
shift | |
# FIXME: it would be good for every argument to be wrapped in quotes | |
echo run $@ | gdb "$cmd" -x strace.gdb &> gdb-strace-log |
#if 0 | |
set -e; | |
cflags="-O2 -Wall -Wextra -pedantic -std=c99" | |
[ "$0" -nt "$0-regular.bin" ] && | |
gcc $cflags -lpthread "$0" -o "$0-regular.bin" | |
[ "$0" -nt "$0-static.bin" ] && { | |
mkdir -p musl-inc |
#!/bin/sh | |
set -x | |
set -e | |
pkg="$1" | |
repo="$2" | |
function __BUILD__() { | |
local pkg="$1" | |
local arch="$2" |
#!/usr/bin/env python3 | |
""" | |
A service to toggle play/pause of a Chromecast via Play multimedia key. | |
Requires running as root because of the "keyboard" module. | |
requirements: pychromecast keyboard | |
""" | |
chromecast_name = "Salon" |
def merge(original: dict, update: dict): | |
return { | |
k: (merge(original[k], v) if M and isinstance(v, dict) and k in original else v) | |
for d, M in ((original, False), (update, True)) | |
for k, v in d.items() | |
} | |
if __name__ == "__main__": | |
base = {"foo": 1, "bar": {"abc": 123, "def": 456}, "baz": 2} |
#!/usr/bin/env python | |
""" | |
example use: | |
./avahi-notify.py - notify for all interfaces | |
./avahi-notify.py eth0 - notify only for eth0 interface | |
""" | |
import io | |
import subprocess | |
import sys |