Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env bash
TRACKPOINT_NAME="DualPoint Stick"
TRACKPAD_NAME="AlpsPS/2 ALPS GlidePoint"
POLL_INTERVAL=1.0s
point_xid=$(xinput --list --id-only "$TRACKPOINT_NAME")
pad_xid=$(xinput --list --id-only "$TRACKPAD_NAME")
is_enabled() {
#!/usr/bin/env bash
HEADER="
127.0.0.1 localhost
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
#!/usr/bin/env python3
import socket
import uuid
import paho.mqtt.client as mqtt
import trio
client_id = 'paho-mqtt-python/issue72/' + str(uuid.uuid4())
topic = client_id
print("Using client_id / topic: " + client_id)
#!/usr/bin/env bash
## Uses transmission-remote to remove public torrents only
## This keeps private torrents up to keep seeding
TORRENTS=$(transmission-remote -t all -i | \
grep -e 'Id:' -e 'Name:' -e 'Percent Done:' -e 'Public torrent:' | \
cut -d':' -f2 | sed -e 's/^[[:space:]]*//' | \
paste -sd '\t\t\t\n')
@bkanuka
bkanuka / update-ath10k.sh
Last active February 1, 2020 12:57
Upgrades ath10k QC6174 from upstream. Would probably work with other wifi drivers with minor changes
#!/usr/bin/bash
# gist id: a6e0b75a356e1aa451de971317962441
# Exit on any error
set -e
BACKED_UP=false
backup_firmware () {
if [[ $BACKED_UP != true ]]; then