Skip to content

Instantly share code, notes, and snippets.

View kitsunde's full-sized avatar
💭
Poisoning pigeons in the park

Kit Sunde kitsunde

💭
Poisoning pigeons in the park
View GitHub Profile
@kitsunde
kitsunde / load.js
Created November 23, 2010 22:44 — forked from bcoe/load.js
new Person().load({
keys: 'age',
startkey: 28,
endkey: 50
}, function(error, people) {
for (var i = 0; i < people.length; i++) {
people[i].sayName();
}
})
@kitsunde
kitsunde / engine.js
Created November 23, 2010 22:43 — forked from bcoe/engine.js
var endtable = require('endtable');
var engine = new endtable.Engine({
database: 'people_example',
username: 'xxxxxx',
password: 'xxxxxx',
host: 'xxxxxx.couchone.com'
});
var ben = new Person({
name: 'Benjamin Coe',
age: 27,
sex: 'male',
interests: ['climbing']
});
ben.interests.push('programming');
@kitsunde
kitsunde / pojo.js
Created November 23, 2010 22:42 — forked from bcoe/pojo.js
var Person = endtable.Object.extend(
{
sayName: function() {
sys.puts('Hello, my name is ' + this.name + '!');
}
},
{
engine: engine,
type: 'person'
}
parseInt('06'); // 6
parseInt('08'); // 0