Skip to content

Instantly share code, notes, and snippets.

import PouchDB from 'pouchdb';
const local = new PouchDB('foo');
const remote = new PouchDB('https://mycouch.com/foo');
// This sequence number will be at most as recent as
// the latest change that describes our upcoming all_docs
// call. If it's older (changes have occured while doing
// this processing) then we'll pick them up in the sync.
const latestSequenceNumberInRemoteAsOfRightNow = remote
@omsmith
omsmith / index.html
Last active February 14, 2017 00:23
Edge calc in filter function
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<style>
.box {
width: 100px;
height: 100px;
}

Keybase proof

I hereby claim:

  • I am omsmith on github.
  • I am omsmith (https://keybase.io/omsmith) on keybase.
  • I have a public key ASBhKG9fovRmShwAD1Kmn4yFkGvcT60wgM5hijtH-xzbswo

To claim this, I am signing this object:

@omsmith
omsmith / foo.js
Created March 11, 2016 03:43
colwem
'use strict';
const expect = require('chai').expect;
describe('foo', () => {
it('should finish', (done) => {
Promise
.reject(new Error())
.catch(() => expect(false).to.be.true)
.then(() => done(), done);
@omsmith
omsmith / output
Created March 3, 2015 02:01
koa-body-parser-issue-9
/home/omsmith/foo/foo.js:38
if (err) throw err
^
AssertionError: noBody server doesnt return body
at /home/omsmith/foo/foo.js:53:10
at Test.assert (/home/omsmith/foo/node_modules/supertest/lib/test.js:213:13)
at Server.assert (/home/omsmith/foo/node_modules/supertest/lib/test.js:132:12)
at Server.g (events.js:257:16)
at emitNone (events.js:67:13)
at Server.emit (events.js:163:7)
@omsmith
omsmith / index.js
Created January 16, 2015 14:34
Browserify 8.1.1 Resolve Error
'use strict';
var someLib = require('some-lib');
module.exports = function () {
console.log('hello from ', someLib.foo);
};