Skip to content

Instantly share code, notes, and snippets.

View calvinmetcalf's full-sized avatar

Calvin Metcalf calvinmetcalf

View GitHub Profile
<!doctype html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<pre style="width: 100%; height: 100%;" id="output"></pre>
<script src="pouchdb.js"></script>
<script src="pouchdb.redblack.js"></script>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<pre style="width: 100%; height: 100%;" id="output"></pre>
<script src="pouchdb.js"></script>
<script src="pouchdb.redblack.js"></script>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<pre style="width: 100%; height: 100%;" id="output"></pre>
<script src="pouchdb.js"></script>
<script src="pouchdb.memory.js"></script>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<pre style="width: 100%; height: 100%;" id="output"></pre>
<script src="pouchdb.memory.js"></script>
<script src="performance-bundle.js"></script>
@calvinmetcalf
calvinmetcalf / Index.js
Created September 23, 2014 23:44
Node.js code you can't impliment in ES6
global.foo === void 0 // true
require('./thing');
global.foo === void 0// false
@calvinmetcalf
calvinmetcalf / readme.md
Last active August 29, 2015 14:05
super in ES

super

basic

Two modes, as a function, it which case it refers to the method of the same name as where is called from but in the ancestor class of the current class

class Foo extend Bar {
@calvinmetcalf
calvinmetcalf / index.html
Created August 18, 2014 16:16
A Pen by Calvin Metcalf.
<ul>
<li class='waiter'><span id="value1">0</span><button id="button1">increment</button>
<li class='waiter'><span id="value2">0</span><button id="button2">increment</button>
<li class='waiter'><span id="value3">0</span><button id="button3">increment</button>
<li class='waiter'><span id="value4">0</span><button id="button4">incriment</button>
</ul>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<script src="//cdn.jsdelivr.net/pouchdb/2.2.3/pouchdb.min.js"></script>
</head>
<body>
// In this example, I want to create a stream that pipes a file through a transform,
// *without* beginning to read data from the file. I want the whole pipeline to be
// lazy until I call read() on the end of the pipeline.
//
// Instead, the console.log() call fires unexpectedly with every line of the file.
var fs = require('fs'),
split = require('split'),
stream = require('stream');
// In this example, I want to create a stream that pipes a file through a
// transform, *without* beginning to read data from the file. I want the
// whole pipeline to be lazy until I call read() on the end of the pipeline.
//
// Instead, the console.log() call fires unexpectedly.
var fs = require('fs'),
stream = require('stream');
var dest = new stream.Transform({highWaterMark:0});