Skip to content

Instantly share code, notes, and snippets.

View mike-zorn's full-sized avatar

Mike Zorn mike-zorn

  • LaunchDarkly
  • Oakland, CA
View GitHub Profile

Keybase proof

I hereby claim:

  • I am apechimp on github.
  • I am apechimp (https://keybase.io/apechimp) on keybase.
  • I have a public key ASCUfOB9Wnj2gX7kUJQPUWgsmiLXGXSKe6dy2tZ0Bu12cwo

To claim this, I am signing this object:

@mike-zorn
mike-zorn / index.js
Created January 28, 2016 17:04
requirebin sketch
p = require('bluebird')
p.resolve()
.then(function () {
return p.reject('lol');
})
.catch(p.OperationalError, console.log.bind(console, 'lies'))
.catch(console.log.bind(console, 'truth'))
@mike-zorn
mike-zorn / index.js
Created July 22, 2015 18:49
requirebin sketch
'use strict'
// require() some stuff from npm (like you were using browserify)
// and then hit Run Code to run it on the right
var request = require('http-as-promised')
request.get({url: 'http://localhost:5030', headers: {'Access-Control-Allow-Origin': 'http://requirebin.com'}})
.then(
console.log.bind(console, 'ok'),
console.log.bind(console, 'err')
)
@mike-zorn
mike-zorn / index.js
Last active August 29, 2015 14:25
requirebin sketch
'use strict'
// require() some stuff from npm (like you were using browserify)
// and then hit Run Code to run it on the right
var httpb = require('http-browserify')
var shttp = require('stream-http')
var xtend = require('xtend')
var url = require('url')
function test (http, name) {
http.get(xtend(url.parse('http://localhost:5030'),{ headers: {'Access-Control-Allow-Origin': 'http://requirebin.com'}}), function (res) {