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
Error: Offset is out of bounds | |
at [object Object].<anonymous> (fs:212:11) | |
at [object Object].flush (fs:877:10) | |
at fs:869:10 | |
at node.js:773:9 |
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
process.on('uncaughtException', function uncaughtException(e) { | |
if(outfile && outfile.writable) { | |
outfile.end(); | |
outfile.destroy(); | |
} | |
console.error(e.message); | |
console.error(e.stack); | |
}) | |
var outfile; |
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 fs = require('fs') | |
, Buffer = require('buffer').Buffer | |
, request = require('request'); | |
var outStream = fs.createWriteStream('out.jpg', {encoding:'binary'}); | |
request({'uri': 'http://marcorogers.com/blog/static/content/images/ebook_conversion_success.jpg' | |
, 'responseBodyStream': outStream} | |
, function(err, data, body) { | |
console.log('done'); | |
}); |
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
import Options | |
from os import unlink, symlink, popen | |
from os.path import exists | |
import subprocess | |
srcdir = "." | |
blddir = "build" | |
VERSION = "0.0.1" | |
def set_options(opt): |
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 b = {}; | |
b.valueOf = function() { return 'foo'; } | |
b.valueOf(); // 'foo' | |
b == 'foo' // true | |
valueOf(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
var extend = require('xmlx').extend; | |
var libxmljs = extend(require('libxmljs')); |
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
# MBP 2.4 GHz dual core i5, 8GB DDR3 RAM, Apple SSD 5 series chipset | |
benchmark starting... | |
clients: 10 | |
operations: 1000 | |
------------------- | |
writes: 21276.60/s | |
clients: 10 |
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 Base = { | |
_ops: {}, | |
_privateFnc: function () {}, | |
abstract: function () {}, | |
init: function (ops) { | |
this._ops = ops || {}; | |
// INIT | |
} | |
}; |
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 sys = require('sys'); | |
var _ = require('underscore')._; | |
var XML = require('libxmljs'); | |
var mem = require('myutils').loadmem(XML); | |
process.addListener('exit', function () { | |
sys.debug('exiting'); | |
mem(); | |
}); |
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
.clearfix {display: inline-block;} | |
.clearfix:after { | |
content: " "; | |
display: block; | |
height: 0; | |
clear: both; | |
font-size: 0; | |
visibility: hidden; | |
} |