Skip to content

Instantly share code, notes, and snippets.

@kgaughan
kgaughan / threadpoolss.py
Created June 10, 2013 16:13
All the thread pool mixins for SocketServer are, well, not that good, so I knocked together my own. This one can cleanly shut down the pool
"""
Thread pool extensions to SocketServer.
"""
import Queue
import SocketServer
import sys
import threading
@jadonk
jadonk / epolltest.c
Created May 3, 2012 17:41
Quick test using epoll to wait on GPIO events
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>
#include <sys/epoll.h>
#include <sys/types.h>
int main(int argc, char** argv) {
@wilson
wilson / config
Created November 21, 2010 20:51
irssi config for gtalk using irssi-xmpp plugin
# in $HOME/.irssi/startup, put: load xmpp on a line by itself
settings = {
"fe-common/xmpp" = {
xmpp_status_window = "yes";
xmpp_send_composing = "no";
};
"xmpp/core" = { xmpp_set_nick_as_username = "yes"; };
};
servers = {