View readablecontroller.js
This file contains 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
// Do this | |
const { writable, readable } = new TransformStream(); | |
const writer = writable.getWriter(); | |
writer.write('something'); | |
writer.write('something'); | |
writer.write('something'); | |
// Here, you can use the writer's `.ready` promise to determine |
View index.js
This file contains 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
'use strict'; | |
const { | |
createHistogram, | |
performance: { | |
timerify | |
} | |
} = require('perf_hooks'); | |
const users = [ |
View fast-path-set bench
This file contains 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
Histogram { | |
min: 200, | |
max: 842751, | |
mean: 326.24267848, | |
exceeds: 0, | |
stddev: 512.5949230856029, | |
percentiles: SafeMap(30) [Map] { | |
0 => 200, | |
50 => 301, | |
75 => 401, |
View index.ts
This file contains 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 * as foo from 'http://localhost:3001/foo.ts' |
View The C Shanty
This file contains 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
There once was a repo written in C | |
The name of the repo was libshanty | |
The buffers overran, her memory leaked | |
O blow, my registers, blow. | |
Soon may the User folk come | |
And try our repo to build and run | |
One day, when the compilin's done | |
We'll make a release and go | |
She had not been two weeks released | |
When down on the net came a CVE |
View gist:73e66d445acb5e240d8e7a0028b8b9e8
This file contains 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 EventEmitter = require('events') | |
const { promisify } = require('util') | |
const foo = new EventEmitter() | |
const sleep = promisify(setTimeout) | |
foo.on('something', async () => { | |
await sleep(100) | |
try { | |
functionThatDoesNotExist() |
View 4088.clinic-doctor-processstat
This file contains 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