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
@aghuddleston
aghuddleston / Ext.ux.data.proxy.JsonAjaxProxy.js
Created August 16, 2012 15:01
Ext JS 4 Proxy that puts params in JSON format, that can be used by Stores.
Ext.define('Ext.ux.data.proxy.JsonAjaxProxy', {
extend:'Ext.data.proxy.Ajax',
alias:'proxy.jsonajax',
actionMethods : {
create: "POST",
read: "POST",
update: "POST",
destroy: "POST"
},
@yangacer
yangacer / icu_converter.cpp
Created July 7, 2011 07:39
ICU converter for GB to UTF8
/****************
* Acer Yang, GAIS Laboratory, Univ. CCU, Taiwan.
*
* g++ -I/usr/local/include -L/usr/local/lib unicode-convert.cpp -licui18n -o uconv
* ./uconv input file charset_name
*
********/
#include "unicode/ucnv.h"