Skip to content

Instantly share code, notes, and snippets.

View jchris's full-sized avatar

Chris Anderson jchris

View GitHub Profile
@jchris
jchris / index.js
Created November 7, 2014 15:37
requirebin sketch
require('tap-browser-color')();
var test = require("tape");
test("clear old", function(t) {
indexedDB.deleteDatabase("safari_test").onsuccess = function(){
t.end()
}
})
var db;
@jchris
jchris / index.js
Created November 7, 2014 15:33
requirebin sketch
var test = require("tape");
test("clear old", function(t) {
indexedDB.deleteDatabase("safari_test").onsuccess = function(){
t.end()
}
})
var db;
test("create db", function(t) {
@jchris
jchris / topics.md
Last active August 29, 2015 14:07
Comprehensive Plan Testimony

I'm capturing my testimony here for others to use / remix / refute / get inspired. Please do the same. I'll just collect everything I sent into one email. It was all sent out as individual mails, to [email protected] and [email protected] - don't forget to include your name and address!

I couldn't find the CRC on the map app, maybe someone can point me to how to comment against it.

Alternative Dwelling Units

ADUs are our best shot at maintaining neighborhood character. Character comes not only from the style of the housing stock, but also from maintaining the affordability of dense central neighborhoods as places for the types of creative people who made Portland what it is today. ADUs should be encouraged anywhere single family housing is found. Affordability in the central city is an equity issue, so the faster we can create housing the better our chances of weathering our current boom and coming out the other side as city that's affordable for people who put quality of life about income.

@jchris
jchris / gist:b005b40bca9e6d16b287
Last active August 29, 2015 14:07
paleo recipes

Banana pancakes:

1 banana, 2 eggs, vanilla, cinnamon Immersion blend (pull air into the batter to make them fluffier) and cook like pancakes. you can also add 1/2 a leftover sweet potato for thicker pancakes.

"meatza":

1 part hamburger 1 part pork sausage, press flat in an iron skillet, bake in the oven ~375. Drain off juice, add mozzarella cheese (I like to use grated hard mozzarella AND fresh soft mozzarella balls) and red sauce, cook some more. Add other pizza toppings.

@jchris
jchris / notes.md
Created October 10, 2014 17:50
notes on CouchDB storage

CouchDB storage bulk docs update flow based on this code.

  • separate out the NonRep documents from the rest of the documents
  • lookup up the old documents, if they exist.
  • Merge the new docs into the revision trees (passed the current seq)
    • this applies the seq number to the documents being written
    • this also finds the obsolete seq nums we can drop
  • update local docs (NonRep docs)
    • they have their own by-id tree, no by-seq tree
  • simpler revs
@jchris
jchris / test.Document.js
Created July 30, 2014 00:46
tests for CBL Document class
// tests for cbl.Document
"use strict";
var cbl = require(".."),
util = require("./util");
// Document
// A Couchbase Lite Document.
//
util.test("Document: Properties", function(t){
@jchris
jchris / detuned-wavepot-verge.js
Created June 17, 2014 19:07
changed some ints to floats.
/*!
*
* stagas - on the verge (tech mix)
*
*/
var bpm = 125;
var tuning = 440;
var transpose = 12;
var coax = require("coax"),
server = coax("https://localhost:59840/"),
database = server("tmp-test");
database.put(function(err, ok){
console.log("create db", err, ok)
var ddocID = "_design/foo"
database(ddocID, function(err, ddoc){
if (err) {
ddoc = {}
var dc = require(".."),
// make wallets
var giver = {
"nickname" : "test-giver",
"keypair" : RS512_GIVER_KEY_PAIR
}
var receiver = {
"nickname" : "test-receive",