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 irc = require('irc'); | |
var client = new irc.Client( | |
'irc.freenode.net', | |
'makeInstallBot', | |
{ channels: ['#node.js', '#nodejitsu'] } | |
); | |
client.on('message', function (from, to, msg) { | |
if (~msg.indexOf('`make install` is not implemented yet. Bug bnoordhuis about it in #node.js')) { |
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
➜ node git:(master) ./node test/simple/test-stdin-resume-pause.js | |
node.js:201 | |
throw e; // process.nextTick error, or 'error' event on first tick | |
^ | |
Error: OK, success '/Users/maciej/dev/src/node/test/simple' | |
at Object.readlinkSync (fs.js:422:18) | |
at Object.realpathSync (fs.js:876:30) | |
at tryFile (module.js:140:15) | |
at Function._findPath (module.js:180:18) |
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.hex = function (data) { | |
var columns = 40, | |
line = '', | |
code; | |
function pad(number, length) { | |
var str = '' + number; | |
while (str.length < length) { | |
str = '0' + str; | |
} |
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'); | |
var stdin = process.openStdin(); | |
stdin.on('data', function (d) { | |
console.log('Oh, I can exit now'); | |
stdin.pause(); | |
}); | |
process.on('exit', function () { | |
console.log('Oh, I am exitting now'); | |
}); | |
setTimeout(function () { |
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
// Copyright Joyent, Inc. and other Node contributors. | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a | |
// copy of this software and associated documentation files (the | |
// "Software"), to deal in the Software without restriction, including | |
// without limitation the rights to use, copy, modify, merge, publish, | |
// distribute, sublicense, and/or sell copies of the Software, and to permit | |
// persons to whom the Software is furnished to do so, subject to the | |
// following conditions: | |
// |
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 path = require('path'), | |
fork = require('child_process').fork; | |
var N = 8, | |
M = 128; | |
// Generate data set | |
console.log('Generating data sets...'); | |
var dataSet = [], row = []; |
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
#include <unistd.h> | |
#include <stdio.h> | |
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <fcntl.h> | |
int main() { | |
printf("Beginning to fork awesomesauce\n"); | |
// Fork the process. |
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 irc = require('irc'); | |
var client = new irc.Client( | |
'irc.freenode.net', | |
'threeLinksBot', | |
{ channels: ['#nodejitsu', '#nodebombrange'] } | |
); | |
client.on('message', function (from, to, msg) { | |
if (msg == '!threelinks') { |
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 net = require('net'); | |
var store = { } | |
var server = net.createServer(function (socket) { | |
var buffer = ""; | |
var index = 0; | |
socket.on("data", function(data) { | |
buffer += data.toString('utf8'); |
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
history|awk '{print $2}'|awk 'BEGIN {FS="|"} {print $1}'|./whichStdin|sort|uniq -c|sort -rn | |
1815 git | |
892 mvim | |
508 npm | |
477 node | |
475 ls | |
383 rm | |
277 cat | |
266 jitsu |