Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env node
var http = require('http'),
faye = require('./faye-node');
var received = 0,
sent = 0;
function getTimestamp () {
return(new Date());
#!/usr/bin/env node
// Use to load test Faye node.js comet server
// $ ./bayeux_load_client.js [number_of_clients]
var repl = require('repl');
var sys = require('sys');
var faye = require('./faye-node');
var room = '/chat/demo';
#!/usr/bin/env python
# Run as cronjob to have a daily fresh desktop
# background from the NASA Image of the day gallery.
# You might need to install BeautifulSoup and appscript
# easy_install BeautifulSoup appscript
from os.path import basename
from BeautifulSoup import BeautifulStoneSoup
from appscript import app, mactypes
from urllib2 import urlopen
# ISO 3166-1 Countries and country codes in a list of tuples
# Useful for Django model choice fields and dropdowns
# http://www.iso.org/iso/english_country_names_and_code_elements
countries = [
("AF","Afghanistan"),
("AL","Albania"),
("DZ","Algeria"),
("AS","American Samoa"),
("AD","Andorra"),