Skip to content

Instantly share code, notes, and snippets.

Ryan Quinn ryanwilliamquinn

Block or report user

Report or block ryanwilliamquinn

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
View streams
const fs = require('fs')
// app.js has one line: console.log('this is app.js')
const appReadstream = fs.createReadStream('files/app.js')
// index.js has one line: console.log('this is index.js')
const indexReadstream = fs.createReadStream('files/index.js')
const out1 = fs.createWriteStream('files/outindexfirst.js')
const out2 = fs.createWriteStream('files/outappfirst.js')
View synonyms
'use strict';
var bpromise = require('bluebird'),
request = require('request'),
_ = require('lodash');
/* fn takes a phrase - may the force be with you
which word has the most synonyms */
var key = "TZlKw4gd1qFQhA2CbMLa";
View gist:434d6d5d0f921618af08
var BPromise = require('bluebird');
BPromise.try(function () {
}).catch(function (err) {
console.log('caught an error with try', err);
ryanwilliamquinn / Function.bind.bind
Created Jul 29, 2014
sorting out function.bind.bind
View Function.bind.bind
1. Function.bind.bind( =
2. =
First you set up the 'binder' function. Note that 'binder' is not an official term, I just made it up:
var bb = Function.bind.bind(; // bb ends up as a function:
then you can use it like so:
var boundfn = bb(someOtherFn); // boundfn is now a function:
You can’t perform that action at this time.