Skip to content

Instantly share code, notes, and snippets.

View moos3's full-sized avatar

Richard moos3

  • Boost Insurance
  • Maine, USA
  • X @moos3
View GitHub Profile
@moos3
moos3 / debugging Annuska
Created March 27, 2011 17:47
TCPClient doesn't like irc_settings['server']
irc_settings = {
'server':'irc.freenode.net',
'port': '6667',
'username' : '<username>',
'password' : '<password>',
'nick' : 'Annuska',
'nick_password' : '<nick_password>',
'ssl': False,
'channels': '#testing_moose',
}
var sys = require("sys"),
http = require("http"),
ws = require('./deps/node-websocket-server/lib/ws'),
fs = require("fs");
var iostat = require("child_process").spawn("iostat",["-w 1"]);
var httpServer = http.createServer();
var server = ws.createServer({debug:true},httpServer);
// Format iostat date
<!DOCTYPE html>
<html>
<head>
<script src="./jquery/jquery.min.js"></script>
<script src="./underscore/underscore-min.js"></script>
<style type="text/css" media="all">
@import "./style.css";
</style>
<script src="./RGraph-1/libraries/RGraph.common.js" ></script>
<script src="./RGraph-1/libraries/RGraph.bar.js" ></script>
var http = require('http'),
url = require('url'),
fs = require('fs'),
io = require('./lib/'),
sys = require('sys');
var iostat = require('child_process').spawn("iostat",["-w 1"]);
send404 = function(res){
res.writeHead(404);
/home/rgenthner/projects/system_monitor/server/lib/socket.io/socket.io.js:33
io.util = {
^
ReferenceError: io is not defined
at Object.<anonymous> (/home/rgenthner/projects/system_monitor/server/lib/socket.io/socket.io.js:33:1)
at Module._compile (node.js:469:23)
at Module._loadScriptSync (node.js:476:10)
at Module.loadSync (node.js:346:12)
at loadModule (node.js:291:14)
at require (node.js:419:14)
/home/rgenthner/projects/system_monitor/server/server.js:41
io.addListener("connect":function(conn){
^
SyntaxError: Unexpected token :
at Module._compile (node.js:465:37)
at Module._loadScriptSync (node.js:476:10)
at Module.loadSync (node.js:346:12)
at Object.runMain (node.js:529:24)
at node.js:759:10
rgenthner@castine:~/projects/system_monitor/server$ cat server.js