Skip to content

Instantly share code, notes, and snippets.

View vsajip's full-sized avatar

Vinay Sajip vsajip

View GitHub Profile
#!/usr/bin/env python3
import sys
import socket
import select
def command(name, args=None):
return {'name': name, 'args': args}
def readcmd():
@vsajip
vsajip / array.c
Created January 23, 2014 14:14 — forked from TooTallNate/array.c
#include <stdio.h>
#include <ffi/ffi.h>
/* The struct with inlined arrays */
struct test {
int array[5];
char str[6];
};
/* The function to FFI invoke */
@vsajip
vsajip / sphinx-reload.py
Created January 27, 2012 22:05 — forked from delijati/sphinx-reload.py
watchdog example
# Run:
# $ virtualenv env
# $ cd env
# $ env/bin/pip install watchdog
# $ env/bin/pip install selenium
# $ env/bin/python sphinx-reload.py
import logging
import os
import selenium.webdriver
#!/usr/bin/env python
import os
import subprocess
import sys
from urllib import pathname2url
import selenium.webdriver
def run():
watch_command = 'inotifywait -rq -e close_write --exclude \'"*.html"\' .'.split()
make_command = 'make html'.split()