Skip to content

Instantly share code, notes, and snippets.

# Simple script which runs code when a file is modified
#
# You will have to install pyinotify
#
# Run with the directory to watch
# eg. python autobuild.py ./
# currently hardcoded to use
#
# (c) 2009, Nikhil Marathe <nsm.nikhil@gmail.com>
# Licensed under the MIT License
@nikhilm
nikhilm / suncirc.cfdg
Created November 22, 2010 13:30
Draws a 'sun', coloured blue using ContextFreeArt
startshape sun
rule sun {
sq { }
36* { r 10 } sq { }
}
rule sq {
CIRCLE { hue 200 saturation 150 }
sq { x 1 y 1 s 0.8 brightness 0.3 }
/*
* Mclarens Bar: Redis based Instant Messaging
* Nikhil Marathe - 22/04/2010
* A simple example of an IM client implemented using
* Redis PUB/SUB commands so that all the communication
* is offloaded to Redis, and the node.js code only
* handles command interpretation,presentation and subscribing.
*
* Requires redis-node-client and a recent version of Redis
We couldn’t find that file to show.
# The language list was generated using the following lines of Python
from pygments.lexers import get_all_lexers
import json
xs = [ (x[0], i) for i, x, _, _ in get_all_lexers() ]
xs.sort()
f = open('file', 'w')
json.dump(xs, f)