This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Hyperswarm from 'hyperswarm' | |
import Hypercore from 'hypercore' | |
import Corestore from 'corestore' | |
import BlobServer from 'hypercore-blob-server' | |
import b4a from 'b4a' | |
const keyInput = Bare.argv[2] | |
if (!keyInput) throw new Error('provide a key') | |
const key = b4a.from(keyInput, 'hex') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Corestore from 'corestore' | |
import RAM from 'random-access-memory' | |
function makeStore (seed) { | |
return new Corestore(RAM, { primaryKey: Buffer.alloc(32).fill(seed) }) | |
} | |
const a = makeStore('a') | |
const aInput = a.get({ name: 'input', valueEncoding: 'json' }) | |
aInput.on('ready', () => console.log('a ready')) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Corestore from 'corestore' | |
import RAM from 'random-access-memory' | |
import Autobase from 'autobase' | |
// Create two chat users, each with their own Hypercores. | |
const st = new Corestore(RAM) | |
const userAInput = st.get({ name: 'UserAInput' }) | |
const userAOutput = st.get({ name: 'UserAOutput', valueEncoding: 'json' }) | |
const userBInput = st.get({ name: 'UserBInput' }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Hyperbee from 'hyperbee' | |
import Corestore from 'corestore' | |
import RAM from 'random-access-memory' | |
const writerStore = new Corestore(RAM) | |
const writerCore = await writerStore.get({ name: 'hyperbee-core' }) | |
await writerCore.ready() | |
const watchAllStore = new Corestore(RAM) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Stream = require('@hyperswarm/dht-relay/ws') | |
const Hypercore = require('hypercore') | |
const RAM = require('random-access-memory') | |
;(async () => { | |
const core = new Hypercore(RAM) | |
await core.ready() | |
const socket = new WebSocket('ws://localhost:8082') | |
const wsStream = new Stream(true, socket) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I am attesting that this GitHub handle lejeunerenard is linked to the Tezos account tz1Xg9bxDfU6TBJAPBUToU1T2MV6Z7887r2s for tzprofiles | |
sig:edsigtpa9m1N8RsYw22arWvzykFqJNnpBQsvf2eEpEGjy7C2J8cLyAw7BUtacMQx177KwUpSpLY37FvF9oSV5iFXdLRPhqs7zDz |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"level":"info","message":"triggered zazu hotkey","timestamp":"2019-01-10T20:14:40.404Z"} | |
{"level":"verbose","message":"sending showWindow event from toggle event","timestamp":"2019-01-10T20:14:40.418Z"} | |
{"level":"info","message":"showing window from manual trigger","timestamp":"2019-01-10T20:14:40.419Z"} | |
{"level":"verbose","message":"sending hide event signal from blur event","timestamp":"2019-01-10T20:14:50.121Z"} | |
{"level":"info","message":"hiding window from manual trigger","timestamp":"2019-01-10T20:14:50.121Z"} | |
{"level":"info","message":"triggered zazu hotkey","timestamp":"2019-01-10T20:14:56.668Z"} | |
{"level":"verbose","message":"sending showWindow event from toggle event","timestamp":"2019-01-10T20:14:56.669Z"} | |
{"level":"info","message":"showing window from manual trigger","timestamp":"2019-01-10T20:14:56.669Z"} | |
{"level":"verbose","message":"sending hide event signal from blur event","timestamp":"2019-01-10T20:15:03.792Z"} | |
{"level":"info","message":"hiding window from manual trigger","timestamp":"2019-01 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const morph = require('nanomorph') | |
const html = require('bel') | |
const Nanocomponent = require('nanocomponent') | |
class Display extends Nanocomponent { | |
createElement (state) { | |
return html`<div>Display</div>` | |
} | |
update () { return true } | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var lastMsg | |
function exlog (text) { | |
var popup = document.getElementById('xlog-popup') | |
if (!popup) { | |
popup = document.createElement('div') | |
Object.assign(popup.style, { | |
width: '100%', | |
height: '100%', | |
top: 0, | |
left: 0, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"scripts": { | |
"test": "eslint **/*.js" | |
}, | |
"devDependencies": { | |
"eslint": "^3.6.0", | |
"eslint-config-standard": "^6.1.0", | |
"eslint-plugin-promise": "^2.0.1", | |
"eslint-plugin-standard": "^2.0.0" | |
}, |
NewerOlder