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 context = { | |
| sayHello: (message) => console.log(`hello, world! ${message}`) | |
| }; | |
| function *doSomething() { | |
| yield 1; | |
| yield 2; | |
| this.sayHello('about to yield!'); | |
| const three = yield new Promise((resolve, reject) => { | |
| setTimeout(() => resolve(3), 1000); |
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
| version: '3' | |
| services: | |
| eventstore: | |
| container_name: geteventstore | |
| image: eventstore/eventstore | |
| ports: | |
| - "2113:2113" | |
| - "1113:1113" | |
| volumes: |
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 Buffer = require('buffer').Buffer; | |
| const uuid = require('uuid/v4'); | |
| const eventstore = require('eventstore-node'); | |
| const eventstoreUrl = process.env.EVENTSTORE_URL || 'tcp://localhost:1113'; | |
| const connSettings = {}; | |
| const esConnection = eventstore.createConnection(connSettings, eventstoreUrl); | |
| esConnection.connect(); | |
| esConnection.once('connected', endpoint => { | |
| console.log(`Connected to eventstore at ${endpoint.host}:${endpoint.port}`); |
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
| package main | |
| import ( | |
| "bufio" | |
| "bytes" | |
| "encoding/binary" | |
| "encoding/json" | |
| "flag" | |
| "fmt" | |
| "io" |
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 crypto = require('crypto'); | |
| const net = require('net'); | |
| function createConnectionId() { | |
| return crypto.randomBytes(16).toString('hex'); | |
| }; | |
| function create() { | |
| // TODO(john): Timeout & Delete these after idling? | |
| const connectedClients = {}; |
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
| #+TITLE: Work | |
| #+AUTHOR: John Nelson <email> | |
| #+TAGS: travel(t) event(e) info(i) ping(p) procure(a) research(r) work(w) idea(d) essay(y) follow_up(f) task(k) dri(c) | |
| #+TODO: TODO(t) CURRENT(c) WAIT(w) REVIEW(r) PROGRESS(o) | DONE(d) PUNT(p) | |
| * research | |
| * useful stuff | |
| * re-file | |
| * inbox |
OlderNewer