- end-of-stream - specify a callback to be called when a stream ends (which is surpsingly hard to get right)
- duplexify - compose a Duplex stream from a Readable and a Writable stream
- pump - pipe streams together and close all of them if one of them closes
- pumpify - combine an array of streams into a single duplex stream using pump and duplexify
- through2 - tools for making Transform streams
- from2 - tools for making Readable streams
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
| #!/usr/bin/env node | |
| const argv = require('minimist')(process.argv.slice(2)) | |
| const clear = require('clear') | |
| const chalk = require('chalk') | |
| const debug = require('debug')('binary') | |
| const EventEmitter = require('events') | |
| const questions = require('./questions') | |
| const help = require('./help') |
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 Hyperdrive = require('hyperdrive') | |
| var Level = require('level') | |
| var Swarm = require('discovery-swarm') | |
| var swarmDefaults = require('datland-swarm-defaults') | |
| // run this like: node thisfile.js 4c325f7874b4070blahblahetc | |
| var link = new Buffer(process.argv[2], 'hex') | |
| var LOCAL_PORT = Number(process.argv[3]) || 3282 // specify port or use 3282 | |
| var db = Level('./dat.db') |
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
| #!/bin/sh | |
| set -x | |
| set -e | |
| # | |
| # Docker build calls this script to harden the image during build. | |
| # | |
| # NOTE: To build on CircleCI, you must take care to keep the `find` | |
| # command out of the /proc filesystem to avoid errors like: | |
| # | |
| # find: /proc/tty/driver: Permission denied |
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
| #!/bin/bash | |
| replacements=( | |
| "NanAsyncWorker/Nan::AsyncWorker" | |
| "NanAsyncQueueWorker/Nan::AsyncQueueWorker" | |
| "NanCallback/Nan::Callback" | |
| "NanSetInternalFieldPointer/Nan::SetInternalFieldPointer" | |
| "NanGetInternalFieldPointer/Nan::GetInternalFieldPointer" | |
| "NanNewBufferHandle\\(([^;]+);/Nan::NewBuffer(\\1.ToLocalChecked();" | |
| "(NanNew(<(v8::)?String>)?\\(\"[^\"]*\"\\))/\\1.ToLocalChecked()" |
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
| // Restify Server CheatSheet. | |
| // More about the API: http://mcavage.me/node-restify/#server-api | |
| // Install restify with npm install restify | |
| // 1.1. Creating a Server. | |
| // http://mcavage.me/node-restify/#Creating-a-Server | |
| var restify = require('restify'); |
- Install Xcode (Avaliable on the Mac App Store)
- Install Xcode Command Line Tools (Preferences > Downloads)
- Install depot_tools
$ git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git$ nano ~/.zshrc- Add
path=('/path/to/depot_tools' $path)
NewerOlder