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
console.log('hello!') |
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 cluster = require('cluster'); | |
var net = require('net'); | |
// listen every second | |
if(process.env.WORKER || cluster.isWorker) { | |
process.on('internalMessage', function(m) { | |
console.log('worker receives', m); | |
}); | |
listen(); |
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 domain = require('domain'); | |
d = domain.create(); | |
d.enter() | |
d.on('error', function(er) { | |
d.exit(); | |
console.log('hmm, er'); | |
process.nextTick(function() { | |
throw er; | |
}); | |
}); |
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 Emitter = require('events').EventEmitter; | |
var domain = require('domain'); | |
d = domain.create(); | |
d.enter() | |
d.on('error', function(er) { | |
d.exit(); | |
ee.emit('report', function() { | |
console.log('reported, now throw'); |
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
:::::::::::::: | |
trace.5674 | |
:::::::::::::: | |
set_robust_list(0x7f6b2f51aa20, 24) = 0 | |
setsid() = 5674 | |
open("/dev/null", O_RDONLY) = 14 | |
dup2(14</dev/null>, 0</dev/pts/38>) = 0 | |
close(14</dev/null>) = 0 | |
ioctl(0</dev/null>, FIONBIO, [0]) = 0 | |
close(-1) = -1 EBADF (Bad file descriptor) |
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 spawn = require('child_process').spawn; | |
var open = require('fs').openSync; | |
console.log('process stdout', process.pid); | |
console.error('process stderr', process.pid); | |
if(process.env.i_am_child) { | |
console.error('child is alive'); | |
} else { | |
var fd = open('out.txt', 'a'); |
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 spawn = require('child_process').spawn; | |
var open = require('fs').openSync; | |
console.log('process stdout', process.pid); | |
console.error('process stderr', process.pid); | |
if(process.env.i_am_child) { | |
console.error('child is alive'); | |
} else { | |
var fd = open('out.txt', 'a'); |
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
sam@samtu:~/w/wiki (master * u=) % git ci -m 'Update Reading' Reading.md | |
[master 81f69fc] Update Reading | |
1 file changed, 1 insertion(+) | |
sam@samtu:~/w/wiki (master u+1) % git push | |
Counting objects: 5, done. | |
Delta compression using up to 4 threads. | |
Compressing objects: 100% (3/3), done. | |
Writing objects: 100% (3/3), 331 bytes | 0 bytes/s, done. | |
Total 3 (delta 2), reused 0 (delta 0) | |
To [email protected]:sam-github/sam-github.github.com.wiki.git |
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
> try{require('/etc/passwd')}catch(e){console.log('e<', e, '>')} | |
/etc/passwd:1 | |
unction (exports, require, module, __filename, __dirname) { root:x:0:0:root:/r | |
^ | |
e< [SyntaxError: Unexpected token :] > | |
undefined | |
> ^[[A^[[A^[[A |
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
{ | |
"main": "zoning.js" | |
} |