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 url = process.argv[2]; | |
http.get(url, function (res) { | |
//res.setEncoding('utf-8'); | |
var bufs; | |
res.on('data', function (buf) { |
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
file:a |
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
for( var b in window ) { | |
if( window.hasOwnProperty(b) ) console.log( b ); | |
} |
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
Object.defineProperty(Object.prototype, 'extend', { | |
enumerable: false, | |
value: function( from ) { | |
Object.getOwnPropertyNames( from ).forEach(function( name ) { | |
if ( name in this ) { | |
Object.defineProperty( this, name, Object.getOwnPropertyDescriptor( from, name )); | |
} | |
}); | |
return this; |
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
function pick( arg, def ) { | |
return ( typeof arg == 'undefined' ? def : arg ) | |
} |
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
function contains( element, search ) { | |
return element.indexOf( search ) != -1 ? true : false; | |
} |
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 exec = require('child_process').exec; | |
app.all('*', function( req, res, next ) { | |
exec('component build --out ./public/js', next) | |
}) |
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
function constructor( args ) { | |
if( !(this instanceof constructor) ) return new constructor( args ); | |
// ... constructor stuff | |
} | |
constructor.prototype.method() {}; | |
constructor.method(); | |
/* |
NewerOlder