Just install connect from npm. Run this in a directory that you'll like to serve static content from. To run on a specific port set ENV "StaticPort"
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
| IMPORTANT: this is outdated, go to https://github.com/netroy/Lockets | |
| "npm install socket-io" & you are ready to go |
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
| /** | |
| * A `tail -f` implementation in Node.js. | |
| * | |
| * Original author : Bratish Goswami <bratishgoswami AT gmail DOT com> | |
| * Modified by : Michel Bartz <michel.bartz AT manwin DOT com> | |
| * | |
| */ | |
| var sys = require("sys"), | |
| fs = require('fs'), |
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
| function(){var a=1E15;return function(){var b=~~(1E3*Math.random());a>9E15-b&&(a=1E15);a+=b;return a.toString(36)}}(); |
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
| /* | |
| ** This is broken... working on a Hashtable implementation first & then use that instead of plain Objects to implement this | |
| */ | |
| HashSet = function HashSet(){ | |
| if(!(this instanceof HashSet)) return; | |
| var _data = {}; | |
| var _length = 0; | |
| var _DEFAULT = new Date(); |
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
| function(b,c){return b.replace(/{[\w\.\(\)]+}/g,function(a){a=a.replace(/[\{\}]/g,"");try{with(c)return eval(a)}catch(b){return""}})}; |
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
| (apply max | |
| (map #(reduce * %) | |
| (for [i (range (count x))] | |
| (take 5 (drop i x))))) |
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
| function(c,a,e,b){function d(a){e.apply(c,[a||event].concat(b))}b=b||[];try{c.addEventListener(a,d,!1)}catch(f){c.attachEvent("on"+a,d)}}; |
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 cluster = require('cluster'), | |
| app = require('./app'); | |
| var workers = {}, | |
| count = require('os').cpus().length; | |
| function spawn(){ | |
| var worker = cluster.fork(); | |
| workers[worker.pid] = worker; | |
| return worker; |
OlderNewer