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
| > node-gyp rebuild | |
| gyp http GET http://nodejs.org/dist/v0.11.7/node-v0.11.7.tar.gz | |
| gyp http 200 http://nodejs.org/dist/v0.11.7/node-v0.11.7.tar.gz | |
| CC(target) Release/obj.target/sundown/src/autolink.o | |
| CC(target) Release/obj.target/sundown/src/buffer.o | |
| CC(target) Release/obj.target/sundown/src/houdini_href_e.o | |
| CC(target) Release/obj.target/sundown/src/houdini_html_e.o | |
| CC(target) Release/obj.target/sundown/src/houdini_html_u.o | |
| In file included from ../src/houdini_html_u.c:6: |
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
| // currently polymer only only loads html imports | |
| // on first page load. After the first pass over the document, | |
| // adding any additional <link> elements will have no effect. | |
| // This adds a link to src, and forces polymer to load it | |
| function load(src, fn) { | |
| var link = document.createElement('link') | |
| link.setAttribute('rel', 'import') | |
| link.setAttribute('href', src) | |
| document.body.appendChild(link) |
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 require('assert') | |
| var a = [] | |
| // make sparse array | |
| a[20] = true | |
| var b = [] | |
| // try copying a's items into b with splice |
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 ops = require('ndarray-ops') | |
| // paste an ndarray into another ndarray at an offset | |
| module.exports = function(arr) { | |
| return function plot(template, offset) { | |
| var t = arr | |
| .hi(offset[0] + template.shape[0], offset[1] + template.shape[1]) | |
| .lo(offset[0], offset[1]) | |
| ops.assign(t, template) | |
| } |
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
| /* | |
| * Annoying server that only responds 200 | |
| * on every 3rd try. | |
| */ | |
| var http = require('http') | |
| var concat = require('concat-stream') | |
| var count = 0 | |
| var s = http.createServer(function(req, res) { |
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 http = require('http'); | |
| var ecstatic = require('ecstatic')(__dirname + '/static'); | |
| var shoe = require('../../'); | |
| var through = require('through') | |
| var net = require('net') | |
| // Goal: | |
| // pipe connection on port 10000 to port 9999 | |
| // but do some async operation | |
| // before doing so |
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
| du -h -d1 ./node_modules | grep M | |
| 1.1M ./node_modules/brfs | |
| 13M ./node_modules/browserify | |
| 1.4M ./node_modules/hyperspace | |
| 14M ./node_modules/reconnect | |
| 16M ./node_modules/shoe | |
| 49M ./node_modules |
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 net = require('net') | |
| var http = require('http') | |
| var auth = require('../') | |
| var server = net.createServer(function(socket) { | |
| socket.pipe(auth()).pipe(remoteConnection) | |
| }).listen(8081) | |
| var remoteServer = http.createServer(function(req, res) { |
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
| from = require('from') | |
| through = require('through') | |
| concat = require('concat-stream') | |
| from([1,2,3,4,5]) | |
| .pipe(through(function(data) { | |
| setTimeout(function(){ | |
| console.log('pushing data', data) | |
| this.push(data) | |
| }.bind(this), 300) |
