Skip to content

Instantly share code, notes, and snippets.

View cwarden's full-sized avatar

Christian G. Warden cwarden

View GitHub Profile
/*global sforce:true */
(function() {
function loadScript(url, callback) {
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = url;
if (callback) {
script.onload = callback;
script.onreadystatechange = function() {
@cwarden
cwarden / INSTALL
Created September 2, 2011 01:01 — forked from mat/INSTALL
Turn an Ubuntu 10.04 server into a StatsD/Graphite server
TODO:
- edit /opt/statsd/local.js
- correct the graphite host to localhost
- if desired, put 'debug: true' in there
- make the box accessible via the hostname 'graphite'
- patch graphite, like described in https://answers.launchpad.net/graphite/+question/152851
@afeinberg
afeinberg / friedman.clj
Created January 3, 2011 09:04
Thomas Friedman AI
(ns friedman)
;; Inspired by ``A Grammar for a Subset of English'', PAIP by Norvig pp. 35-36
(defn one-of [lst]
(nth lst (rand-int (count lst))))
(defn common-occupation []
(one-of '("barber" "cab driver" "teacher" "fisherman" "doctor")))