Skip to content

Instantly share code, notes, and snippets.

@jgeboski
jgeboski / hexchat-2.10.2-extend-nick-colors.patch
Created January 27, 2016 01:05
Extend the color range of nicknames in HexChat
diff --git a/src/common/text.c b/src/common/text.c
index 73ea7f9..ece22e4 100644
--- a/src/common/text.c
+++ b/src/common/text.c
@@ -2080,8 +2080,6 @@ pevt_build_string (const char *input, char **output, int *max_arg)
/* also light/dark gray (14/15) */
/* 5,7,8 are all shades of yellow which happen to look damn near the same */
-static char rcolors[] = { 19, 20, 22, 24, 25, 26, 27, 28, 29 };
-
@jgeboski
jgeboski / xonmaps.py
Last active July 7, 2022 04:05
Gets the latest Xonotic map URLs
#!/usr/bin/env python3
import os
import sys
from glob import glob
from lxml import html
from typing import List, NamedTuple, Optional
from urllib.parse import urljoin
from urllib.request import urlopen
BASE_URL = "https://beta.xonotic.org/autobuild-bsp/"
@jgeboski
jgeboski / usb-suspend.sh
Last active May 9, 2018 03:54
Script to suspend all USB devices
#!/bin/sh
DEV_ROOT=/sys/bus/usb/devices
read_usb_sysfs() {
cat "$DEV_ROOT/$1/$2"
}
write_usb_sysfs() {
path="$DEV_ROOT/$1/$2"
@jgeboski
jgeboski / prometheus-address-collector.py
Created December 10, 2022 23:27
Collector for Prometheus for interface addresses with timing data. Useful with a Cron job in pfSense to export WAN addresses via the node exporter.
#!/usr/bin/env python3.8
import argparse
import logging
import os
import re
import subprocess
import time
from datetime import datetime
from ipaddress import ip_address, IPv4Address, IPv6Address