Skip to content

Instantly share code, notes, and snippets.

dns.reverse(a, function (err, domains) {
if (err) {
sys.puts('reverse for ' + a + ' failed: ' + err.message);
} else {
sys.puts('reverse for ' + a + ': ' + JSON.stringify(domains));
}
});
// If foo is true, then we do all this stuff
if (foo) {
// Do foo stuff
}
// This is the stuff that happens in the else case
// but now I'm going to keep writing
// and eventually this else will move further
// and further down the page
// and at somepoint, it wont seem logically connected
// to the if at all.
path.walk = function (start, callback) {
fs.stat(start, function (err, stat) {
if (stat.isDirectory()) {
fs.readdir(start, function (err, files) {
var coll = files.reduce(function (acc, i) {
var abspath = path.join(start, i);
if (fs.statSync(abspath).isDirectory()) {
path.walk(abspath, callback);
fs.walkSync = function (start, callback) {
var stat = fs.statSync(start);
if (stat.isDirectory()) {
var filenames = fs.readdirSync(start)
var coll = filenames.reduce(function (acc, i) {
var abspath = path.join(start, i);
if (fs.statSync(abspath).isDirectory()) {
acc.dirs.push(abspath);
} else {
var sys = require('sys');
var EventEmitter = require('events').EventEmitter;
// Example useage
//
// var syn = require('syn').syn;
// var e = syn(fs.stat, ["/"], function (err, stat) {});
//
// e.addListener("started", function () {
/usr/bin/ld: /usr/lib/libboost_system-mt.a(error_code.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/lib/libboost_system-mt.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[2]: *** [blib/arch/auto/librets/librets.so] Error 1
make[2]: Leaving directory `/home/aconbere/Projects/Estately/estately/requirements/librets-1.4.0/build/swig/perl'
make[1]: *** [build/swig/perl/blib/arch/auto/librets/librets.so] Error 2
make[1]: Leaving directory `/home/aconbere/Projects/Estately/estately/requirements/librets-1.4.0'
make: *** [all] Error 2
/usr/bin/ld: /home/aconbere/Projects/Estately/estately/requirements/librets-1.4.0/build/librets/lib/librets.a(CapabilityUrls.o): relocation R_X86_64_32 against `.bss' can not be used when making a shared object; recompile with -fPIC
/home/aconbere/Projects/Estately/estately/requirements/librets-1.4.0/build/librets/lib/librets.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[2]: *** [blib/arch/auto/librets/librets.so] Error 1
make[2]: Leaving directory `/home/aconbere/Projects/Estately/estately/requirements/librets-1.4.0/build/swig/perl'
make[1]: *** [build/swig/perl/blib/arch/auto/librets/librets.so] Error 2
make[1]: Leaving directory `/home/aconbere/Projects/Estately/estately/requirements/librets-1.4.0'
make: *** [all] Error 2
opae: ohai(master) aconbere$ ./bin/ohai
/home/aconbere/.rvm/gems/ree-1.8.7-2010.01/gems/json-1.4.3/lib/json/common.rb:270:in `to_json': stack level too deep (SystemStackError)
from /home/aconbere/.rvm/gems/ree-1.8.7-2010.01/gems/json-1.4.3/lib/json/common.rb:270:in `generate'
from /home/aconbere/.rvm/gems/ree-1.8.7-2010.01/gems/json-1.4.3/lib/json/common.rb:270:in `pretty_generate'
from ./bin/../lib/ohai/system.rb:220:in `json_pretty_print'
from ./bin/../lib/ohai/application.rb:104:in `run_application'
from ./bin/../lib/ohai/application.rb:75:in `run'
from ./bin/ohai:50
npm createMain ./npm
npm linkMain npm-0.1.11
npm linkLib npm-0.1.11
npm linkBins npm-0.1.11
npm linkBin npm ./cli.js
npm linkBins failed
npm ! Error: EACCES, Permission denied '/usr/local/bin/npm-0.1.11'
at node.js:204:9
opae: boxer(master) aconbere$ node lib/boxer.js example test
processing: /home/aconbere/Projects/javascript/boxer/example
publishing to: /home/aconbere/Projects/javascript/boxer/test
buffer:46
return this.utf8Write(string, offset);
^
TypeError: Offset is out of bounds
at Buffer.write (buffer:46:19)
at Object.write (fs:162:14)
at writeAll (fs:312:6)