Skip to content

Instantly share code, notes, and snippets.

View Frando's full-sized avatar
🏠

Franz Heinzmann Frando

🏠
View GitHub Profile
@Frando
Frando / schema.proto
Last active February 8, 2019 00:26
"hyperclock" schema proposal
message Entry {
message Feed {
required bytes key = 1;
}
message Feeds {
repeated Feed feeds = 1;
optional Feed contentFeed = 2;
}
@Frando
Frando / example.js
Last active March 24, 2018 12:43
smoosh-stream
var flatten = require('.')
var bulk = require('bulk-write-stream')
var stream = bulk.obj(flatten(write))
function write(batch, cb) {
batch.forEach(function(obj) {
console.log(obj)
})
cb(null)
@Frando
Frando / index.js
Created March 23, 2018 18:46
hyperdrive & hypergraph in same hyperdb
var hyperdb = require('hyperdb')
var sub = require('subhyperdb')
var hyperdrive = require('hyperdrive')
var hypergraph = require('hyper-graph-db')
var hyperdriveMessages = require('hyperdrive/lib/messages')
var dbName = process.argv[2]
var op = process.argv[3]
if (op !== 'read' && op !== 'write') {