[root@00-0c-29-aa-24-ba ~]# imgadm list
UUID NAME VERSION OS PUBLISHED
9eac5c0c-a941-11e2-a7dc-57a6b041988f base64 13.1.0 smartos 2013-04-26T15:17:57Z
This file contains 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
{"max":100000,"chunkSize":500,"highWaterMark":500,"maxConcurrentBatches":4,"timeoutBetweenChunks":0,"valueSize":10,"wrap":false,"ellapsed":3403} | |
{"max":100000,"chunkSize":500,"highWaterMark":500,"maxConcurrentBatches":4,"timeoutBetweenChunks":0,"valueSize":10,"wrap":true,"ellapsed":2656} | |
{"max":100000,"chunkSize":500,"highWaterMark":500,"maxConcurrentBatches":4,"timeoutBetweenChunks":0,"valueSize":100,"wrap":false,"ellapsed":3437} | |
{"max":100000,"chunkSize":500,"highWaterMark":500,"maxConcurrentBatches":4,"timeoutBetweenChunks":0,"valueSize":100,"wrap":true,"ellapsed":2662} | |
{"max":100000,"chunkSize":500,"highWaterMark":500,"maxConcurrentBatches":4,"timeoutBetweenChunks":0,"valueSize":1000,"wrap":false,"ellapsed":4186} | |
{"max":100000,"chunkSize":500,"highWaterMark":500,"maxConcurrentBatches":4,"timeoutBetweenChunks":0,"valueSize":1000,"wrap":true,"ellapsed":2549} | |
{"max":100000,"chunkSize":500,"highWaterMark":500,"maxConcurrentBatches":4,"timeoutBetweenChunks":10,"valueSize":10,"wrap":false,"ellapsed":3353} | |
{"max |
This file contains 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
โ cd projects/test | |
pedroteixeira@Pedros-MacBook-Pro:~/projects/test (master) | |
โ npm install kinect | |
npm http GET https://registry.npmjs.org/kinect | |
npm http 200 https://registry.npmjs.org/kinect | |
> [email protected] install /Users/pedroteixeira/projects/test/node_modules/kinect | |
> node-gyp rebuild | |
gyp http GET http://nodejs.org/dist/v0.8.21/node-v0.8.21.tar.gz |
This file contains 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 previousDistance = Number.MAX_VALE; | |
var dir = 0; | |
function tick(distance) { | |
console.log('distance:', distance); | |
var randomTurn = 2 - Math.round(Math.random() * 4); | |
console.log(randomTurn); | |
if (distance >= previousDistance) dir += randomTurn; | |
var directions = ['up', 'down', 'left', 'right']; | |
var direction = directions[dir % directions.length]; | |
previousDistance = distance; |
bla bla http://www.google.com/abc
This file contains 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
module.exports = function(conf) { | |
return function(a, b) { | |
return a + b; | |
}; | |
}; |
This file contains 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 BufferedStream = require('bufferedstream') | |
, inherits = require('util').inherits | |
; | |
function Transformation(callback) { | |
BufferedStream.apply(this) | |
this.callback = callback | |
} | |
inherits(Transformation, BufferedStream) |
This file contains 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
pedroteixeira:test pedroteixeira$ node test.js | |
uncaught exception [Error: abc1] | |
uncaught exception [Error: def] | |
uncaught exception [Error: abc2] | |
uncaught exception [Error: def] |
This file contains 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() { | |
function _deepEqual(actual, expected) { | |
// 7.1. All identical values are equivalent, as determined by ===. | |
if (actual === expected) { | |
return true; | |
} else if (actual instanceof Date && expected instanceof Date) { | |
return actual.getTime() === expected.getTime(); | |
// 7.3. Other pairs that do not both pass typeof value == "object", |
This file contains 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
Client: | |
console.log('BEFORE:', process.memoryUsage()); | |
var Rectangle = require('./rectangle'); | |
var rectangles = []; | |
for(var i = 0; i < 100000; i++) { | |
rectangles.push(new Rectangle(1,2,3,4)); | |
} |