Skip to content

Instantly share code, notes, and snippets.

View cpulvermacher's full-sized avatar

Christian Pulvermacher cpulvermacher

View GitHub Profile
@sbrugman
sbrugman / testable_tread.py
Last active November 20, 2024 05:17
Wrapper around Python's thread that propages exceptions (pytest).
import threading
class TestableThread(threading.Thread):
"""Wrapper around `threading.Thread` that propagates exceptions."""
def __init__(self, target, args):
super().__init__(self, target=target, args=args)
self.exc = None
@m13253
m13253 / upower-Add-a-critical-action-Ignore.patch
Created October 5, 2016 14:19
A patch for UPower to disable low battery action
From 1ba6e724dabf3a91e59b871750e22d420a4b1238 Mon Sep 17 00:00:00 2001
From: Star Brilliant <[email protected]>
Date: Wed, 5 Oct 2016 22:02:36 +0800
Subject: [PATCH] Add a critical action: Ignore
---
etc/UPower.conf | 3 ++-
src/linux/up-backend.c | 5 +++++
2 files changed, 7 insertions(+), 1 deletion(-)
@eighthave
eighthave / find-https-debian-archives.py
Last active May 26, 2024 03:45
Script to find official Debian mirrors that support HTTPS
#!/usr/bin/env python3
import urllib.request
import re
import ssl
import sys
# # find generic mirrors
mirrors = urllib.request.urlopen('http://www.debian.org/mirror/list')
https = []