Skip to content

Instantly share code, notes, and snippets.

View samizdatco's full-sized avatar

Christian Swinehart samizdatco

View GitHub Profile

Keybase proof

I hereby claim:

  • I am samizdatco on github.
  • I am samizdat (https://keybase.io/samizdat) on keybase.
  • I have a public key ASCpFjJuOmpekwVzyfnJjg9xWe1suDH98wlmJbZf9QHq2Qo

To claim this, I am signing this object:

@samizdatco
samizdatco / async-demo.py
Created February 14, 2012 20:58
A Messy Demo
#!/usr/bin/env python
# encoding: utf-8
"""
async-demo.py
Created by Christian Swinehart on 2012-02-14.
Copyright (c) 2012 Samizdat Drafting Co. All rights reserved.
"""
from __future__ import with_statement
@samizdatco
samizdatco / cleanup_timer.c
Created November 17, 2011 21:07
An attempt at a periodic callback in nginx
#define NGX_HTTP_AUTH_DIGEST_CLEANUP_INTERVAL 3000
ngx_event_t *ngx_http_auth_digest_cleanup_timer;
static ngx_atomic_t *ngx_http_auth_digest_cleanup_lock;
// set as the "init process" callback in the ngx_module_t struct
static ngx_int_t ngx_http_auth_digest_worker_init(ngx_cycle_t *cycle){
if (ngx_process != NGX_PROCESS_WORKER){
return NGX_OK;
}