Skip to content

Instantly share code, notes, and snippets.

View tonikelope's full-sized avatar
🌴
On vacation

Antonio L. Vivar tonikelope

🌴
On vacation
  • España
View GitHub Profile
@altbrace
altbrace / bt-onconnect.py
Last active April 5, 2024 06:38
Automatic sound profile change on Bluetooth device connect
#!/usr/bin/env python3
# Ref https://gist.github.com/altbrace/52ae1783b31257021520673fadb95b6e
from pydbus import SystemBus
from gi.repository import GLib # don't mind the import error if you get one, it should work
import subprocess
import time
import re
ADDRESS = '74_5C_4B_0C_C4_41' # your Bluetooth device's MAC separated by underscores
@foca
foca / release
Last active March 31, 2023 14:15
Small shell script to create GitHub releases from the command line
#!/usr/bin/env bash
set -e
[ -z "$DEBUG" ] || set -x;
usage() {
echo "$0 <repo> <tag> [<release name>] [-- <asset>...]" >&2;
}
if [ "$1" = "-h" -o "$1" = "--help" ]; then