Skip to content

Instantly share code, notes, and snippets.

Dominic Tarr dominictarr

Block or report user

Report or block dominictarr

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@dominictarr
dominictarr / readme.md
Created Nov 26, 2018
statement on event-stream compromise
View readme.md

Hey everyone - this is not just a one off thing, there are likely to be many other modules in your dependency trees that are now a burden to their authors. I didn't create this code for altruistic motivations, I created it for fun. I was learning, and learning is fun. I gave it away because it was easy to do so, and because sharing helps learning too. I think most of the small modules on npm were created for reasons like this. However, that was a long time ago. I've since moved on from this module and moved on from that thing too and in the process of moving on from that as well. I've written way better modules than this, the internet just hasn't fully caught up.

@broros

otherwise why would he hand over a popular package to a stranger?

If it's not fun anymore, you get literally nothing from maintaining a popular package.

One time, I was working as a dishwasher in a restu

View url-encoded-links.js
View output.txt
{ '@DTNmX+4SjsgZ7xyDh5xxmNtFqa6pWi5Qtw7cE8aR9TQ=.ed25519': 'wx.larpa.net:8008:@DTNmX+4SjsgZ7xyDh5xxmNtFqa6pWi5Qtw7cE8aR9TQ=.ed25519',
'@D0GsAaMyt96Ze3q1YiiuzWhPkyou2fVTUgw8Xr+G7Jo=.ed25519': '9ithub.com:8008:@D0GsAaMyt96Ze3q1YiiuzWhPkyou2fVTUgw8Xr+G7Jo=.ed25519',
'@dBQlwh9Gtr3i5YMOGtIOKtGNVepeu+nyb6KGl1vtOcM=.ed25519': 'sp9.solarpunk.dk:8008:@dBQlwh9Gtr3i5YMOGtIOKtGNVepeu+nyb6KGl1vtOcM=.ed25519',
'@SP4xNZmDsOuRrjDS6NCcmr3xoieXQOMPBQ4TkUHSJ2M=.ed25519': 'sp4.solarpunk.dk:8008:@SP4xNZmDsOuRrjDS6NCcmr3xoieXQOMPBQ4TkUHSJ2M=.ed25519',
'@BzMp3eRNjPUonwRd/0loT3KaRKIMFx7ZOZQE1F+XDug=.ed25519': 'sbot.ktorn.com:8008:@BzMp3eRNjPUonwRd/0loT3KaRKIMFx7ZOZQE1F+XDug=.ed25519',
'@eM4e8pmRiZpeCBitqp6vq3lT8EwC5UjjKuajHbpWnNI=.ed25519': '198.199.97.80:8008:@eM4e8pmRiZpeCBitqp6vq3lT8EwC5UjjKuajHbpWnNI=.ed25519',
'@YXquIbh1OqCCdMuqCO4tSJuYR7RL811CTuu59n7G0pk=.ed25519': 'post.tableflip.io:8008:@YXquIbh1OqCCdMuqCO4tSJuYR7RL811CTuu59n7G0pk=.ed25519',
'@nSCVHJ5OSajcynWgo3Xh0bChZN3e4oV1ooIuFWdxrmg=.ed25519': 'hub.devcontr
View libsodium.wasm.base64.json
"data:application/octet-stream;base64,AGFzbQEAAAAByQM0YAABf2AEf39/fwBgAX8AYAAAYAF/AX9gA39/fwF/YAJ/fwBgCn9/f39+f35/f38Bf2ACf34AYAl/f39+f35/f38Bf2AJf39/fn9/fn9/AX9gCX9/f39+f35/fwF/YAR/f35/AX9gA39/fgBgBH9/fn8AYAJ/fwF/YAZ/f39+f38Bf2AHf39/fn9/fwF/YAV/f35/fwF/YAZ/f35/f38Bf2ADf39/AGABfwF+YAN/f38BfmAEf39/fwF/YAN/f34Bf2ACfn8BfmAFf39/f38AYAZ/f39/fn8AYAV/f39/fwF/YAJ+fgF+YAx/f39/f39/f39/f38Bf2AHf35/fn9+fwF/YAV/f35+fwF/YAR/fn9/AX9gCH9+f35/fn9/AX9gBn9/fn5/fwF/YAN/fn8Bf2AIf39/f35/fn8Bf2AIf39/f39+f34Bf2AFf39/fn8Bf2AGf39/fn9/AGAFf39/fn8AYAR/fn9/AGAFf39+f38AYAZ/f35/f38AYAZ/f35/fn8AYAR/f39+AGAHf39/f39/fwF/YAh/f39/f39/fwF/YAt/f39/f39/f39/fwF/YAZ/f39/f38Bf2AKf39/f39/f39/fwF/AosCDQNlbnYORFlOQU1JQ1RPUF9QVFIDfwADZW52CFNUQUNLVE9QA38AA2VudgZtZW1vcnkCAYACgAIDZW52BXRhYmxlAXAAAANlbnYNZW5sYXJnZU1lbW9yeQAAA2Vudg5nZXRUb3RhbE1lbW9yeQAAA2VudhdhYm9ydE9uQ2Fubm90R3Jvd01lbW9yeQAAA2Vudg5fX19hc3NlcnRfZmFpbAABA2VudgtfX19zZXRFcnJObwACA2VudgZfYWJvcnQAAwNlbnYXX2Vtc2NyaXB0ZW5fYXNtX2NvbnN0X2kABANlbnYWX2Vtc2NyaXB0ZW5fbWVtY3B5X2JpZwAFA2Vudghfc3lzY29uZgAEA/
View output.txt
$ node stream-heap.js
Readable 358.53592 134
Writable 623.37824 258
Transform 709.05584 1310
$ node pull-heap.js
values 155.2692 70
map 84.50328 7
@dominictarr
dominictarr / thumbnails.js
Last active Jan 1, 2018
test script for generating thumbnails in an electron app
View thumbnails.js
//updated to save thumbnails!
var h = require('hyperscript')
var fs = require('fs')
var pull = require('pull-stream')
var paramap = require('pull-paramap')
var path = require('path')
//XXX note, I added `module.exports = downsample` to the bottom of this file, TODO: make PR
var downsample = require('downscale/src/downsample')
View blockstack.txt
Verifying that "dominictarr.id" is my Blockstack ID. https://onename.com/dominictarr
@dominictarr
dominictarr / box-stream-with-nonce.js
Last active Feb 9, 2017
example of how to read a fixed size binary prefix to a pull-stream
View box-stream-with-nonce.js
var Reader = require('pull-reader')
var box = require('./')
var pCont = require('pull-cont')
var randomBytes = require('crypto').randomBytes
var pull = require('pull-stream')
var Cat = require('pull-cat')
//key is 32 bytes and nonce is 24 bytes, written to start of stream.
exports.unbox = function UnboxStreamWithNonce (key) {
@dominictarr
dominictarr / index.js
Created Apr 29, 2016
nested-representation-state-transfer.js
View index.js
'use strict'
var h = require('hyperscript')
/*
running this example:
browserify index.js | indexhtmlify > test.html
# then open in your browser
*/
View README.md

Consistent Archive Tree

motivation

Despite it's considerable age, Tape ARchive format (tar) is still in widespread use. This is unfortunate because has as several features that are footguns in a modern context.

Firstly, because it contains timestamps (ctime, mtime) then archiving the same files twice will give a tar file that has a few bytes different, and thus will have a different hash. creating a archive deterministically was not a priority when tar was designed.

You can’t perform that action at this time.