Skip to content

Instantly share code, notes, and snippets.

/Users/zach/repos/handlebars.js/spec/spec_helper.rb:54:in `block in <module:Spec>': undefined method `[]=' for nil:NilClass (NoMethodError)
from /Users/zach/repos/handlebars.js/spec/spec_helper.rb:53:in `instance_eval'
from /Users/zach/repos/handlebars.js/spec/spec_helper.rb:53:in `<module:Spec>'
from /Users/zach/repos/handlebars.js/spec/spec_helper.rb:31:in `<module:Handlebars>'
from /Users/zach/repos/handlebars.js/spec/spec_helper.rb:30:in `<top (required)>'
from /Users/zach/repos/handlebars.js/spec/acceptance_spec.rb:1:in `require'
from /Users/zach/repos/handlebars.js/spec/acceptance_spec.rb:1:in `<top (required)>'
from /Users/zach/.rvm/gems/ruby-1.9.1-p378/gems/rspec-core-2.2.1/lib/rspec/core/configuration.rb:327:in `load'
from /Users/zach/.rvm/gems/ruby-1.9.1-p378/gems/rspec-core-2.2.1/lib/rspec/core/configuration.rb:327:in `block in load_spec_files'
from /Users/zach/.rvm/gems/ruby-1.9.1-p378/gems/rspec-core-2.2.1/lib/rspec/core/configuration.rb:327:in `map'
#
# Cookbook Name:: nodejs
# Recipe:: default
#
if ['solo'].include?(node[:instance_role])
nodejs_file = "node-v0.1.101.tar.gz"
nodejs_dir = "node-v0.1.101"
nodejs_url = "http://nodejs.org/dist/#{nodejs_file}"
.mouse{
position: absolute;
background-image: url('../images/cursor.png');
width: 15px;
height: 22px;
z-index: 100;
}
var HTTPParser = process.binding('http_parser').HTTPParser;
var net = require('net');
var path = require('path');
var sys = require('sys');
var Worker = require('webworker/webworker').Worker;
var VHOSTS = ['foo.bar.com', 'baz.bizzle.com'];
var WORKERS = {};
VHOSTS.forEach(function(vh) {
@zaach
zaach / def.js
Created July 14, 2010 03:42 — forked from tbtlr/def.js
/*
* def.js: Simple Ruby-style inheritance for JavaScript
*
* Copyright (c) 2010 Tobias Schneider
* This script is freely distributable under the terms of the MIT license.
*
*
* Example:
*
* def ("Person") ({
Here's a quick and dirty bash_completion script. Paste this in a file named "google" in your /etc/bash_completion.d/ directory:
_google()
{
local cur prev commands options
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
commands="help picasa blogger youtube docs contacts calendar"
if [[ $COMP_CWORD -eq 1 ]] ; then
/*
* Copyright (c) 2010 Tobias Schneider
* This script is freely distributable under the terms of the MIT license.
*/
(function(){
var UPC_SET = {
"3211": '0',
"2221": '1',
"2122": '2',
var JAKE = require("jake");
var FILE = require("file");
var narcissusPath = FILE.path(require("packages").catalog.narcissus.directory);
JAKE.task("default", function() {
var script = exports.bundle([
{ id : "narcissus/defs", path : narcissusPath.join("lib", "narcissus", "defs.js") },
{ id : "narcissus/parse", path : narcissusPath.join("lib", "narcissus", "parse.js") },
{ id : "narcissus/format", path : narcissusPath.join("lib", "narcissus", "format.js") }
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.10 (Darwin)
mQENBEtsQe8BCACm5G0/ei0IxyjVEp6EEtbEbWK1Q4dKaONtiCODwB8di+L8tlUd
Ra5QYxeyV90C+dqdh34o79enXxT6idHfYYqDdob2/kAPE6vFi4sLmrWIVGCRY++7
RPclZuezPm1sxG1TRAYEsW0VZUE9ofdoQ8xlUZDyn2BSjG8OCT2e4orRg1pHgzw2
n3hnWqJNuJS4jxcRJOxI049THIGUtqBfF8bQoZw8C3Wg/R6pGghUfNjpA6uF9KAH
gnqrC0swZ1/vwIJt9fnvAlzkqLrssYtKH0rMdn5n4g5tJLqY5q/NruHMq2rhoy3r
4MC1w8GTbP7qR83wAyaLJ7xACOKqxB3SrDFJABEBAAG0I1JpY2hhcmQgS3JldXRl

2010 Modularity Olympics

This is a contest, open to programming languages from all nations, to write modular and extensible code to solve the following problem: Implement a service that can run queries on a database.

The Challenge

Sounds simple right? Wrong! A programmer without control over the source-code of that service must be able to later add enhancements such as statistics collecting, timeouts, memoization, and so forth. There are a few more requirements:

  1. the “enhancements” must be specified in a configuration object which is consumed at run-time (e.g., it could be based on user-input).
  2. The enhancements are ordered (stats collecting wraps timeouts, not the other way around) but it must be possible to reverse the order of the enhancements at run-time.
  3. The enhancements must be “surgical” and not “global”. That is, it must be possible to simultaneously have two query services, one reversed and one not reversed, and even have a query service without any enhancements.