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 /
Created Nov 26, 2018
statement on event-stream compromise

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.


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


High level style in javascript.

Opinions are like assholes, every one has got one.

This one is mine.

Punctuation: who cares?

Punctuation is a bikeshed. Put your semicolons, whitespace, and commas where you like them.

dominictarr /
Last active Dec 14, 2019
Distributed Systems Papers

(dominic: this list of papers was originally recommended to me by Brain Noguchi @bnoguchi, and was a great start to understanding distributed systems)

Here's a selection of papers that I think you would find helpful and interesting:

Time, Clocks, and the Ordering of Events in a Distributed System

The seminal paper about event ordering and concurrency. The important result is that events in a distributed system define a partially ordered set. The connection to what we're working on is fundamental, as this defines how to detect concurrent updates. Moreover, the chosen algorithm to turn the partially ordered set into a totally ordered set defines the conflict resolution algorithm.

dominictarr / git-commit-prefixes
Created May 23, 2011 — forked from Marak/git-commit-prefixes
Short list of Git commit prefixes used at Nodejitsu
View git-commit-prefixes
[api]: New apis / changes to apis
[test]: Update test/* files
[dist]: Changes to submodules, version bumps, updates to package.json
[minor]: Small changes
[doc]: Updates to documentation
[ux]: Updates to UX
[fix]: Bug fixes
[bin]: Update binary scripts associated with the project
[merge]: Resolved git merge from upstream or otherwise
[refactor]: Refactor of existing code with no external API changes
dominictarr / aggregate-help.js
Created Dec 2, 2019
aggregate muxrpc-usage help
View aggregate-help.js
module.exports = function (sbot, cb) {
var help = null (err, data) {
if(!data.type) data.type = 'group'
help = data
var keys = Object.keys(sbot)
var n = keys.length + 1
keys.forEach(function (key) {
if(sbot[key] && 'function' === typeof sbot[key].help)
sbot[key].help(function (err, data) {
View output.txt
{ '@DTNmX+4SjsgZ7xyDh5xxmNtFqa6pWi5Qtw7cE8aR9TQ=.ed25519': '',
'@D0GsAaMyt96Ze3q1YiiuzWhPkyou2fVTUgw8Xr+G7Jo=.ed25519': '',
'@dBQlwh9Gtr3i5YMOGtIOKtGNVepeu+nyb6KGl1vtOcM=.ed25519': '',
'@SP4xNZmDsOuRrjDS6NCcmr3xoieXQOMPBQ4TkUHSJ2M=.ed25519': '',
'@BzMp3eRNjPUonwRd/0loT3KaRKIMFx7ZOZQE1F+XDug=.ed25519': '',
'@eM4e8pmRiZpeCBitqp6vq3lT8EwC5UjjKuajHbpWnNI=.ed25519': '',
'@YXquIbh1OqCCdMuqCO4tSJuYR7RL811CTuu59n7G0pk=.ed25519': '',
'@nSCVHJ5OSajcynWgo3Xh0bChZN3e4oV1ooIuFWdxrmg=.ed25519': 'hub.devcontr
View url-encoded-links.js

there are two fundamental types of streams source and sink. There are two composite types of streams through (aka transform) and duplex A through stream is a sink stream that reads what goes into the source. a duplex stream is a pair of {source, sink} streams.

Source streams have two methods.

readable stream: source

A source (readable stream) is an async function that may be called repeatedly until it returns a terminal state. You must not call the read function until the previous call has returned, except for a call to abort the stream. pull-streams have back pressure, but it implicit instead of sending an explicit back pressure signal. If a source

dominictarr /
Created Jun 23, 2015
Decentralized Moderation

decentralized moderation

I am working on a p2p protocol for a decentralized social network. I wanted to build decentralized applications (to avoid having central powers who tend to optimize for the wrong thing -- ad clicks) but it's not exactly simple: what makes decentralized protocols hard is a thing called "the sybil attack".

The sybil attack is when a malicious actor generates a large number of fake accounts, and attempts to disrupt the network. This is also a problem in centralized systems - online voting, email spam, sockpuppet armies, gaming reddit

This kind of attack also appears in the human realm! such as astroturfing

You can’t perform that action at this time.