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
web: node server.js |
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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
</head> | |
<body> | |
<form id="chat"> | |
<fieldset id="blabla"> | |
</fieldset> |
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
How to add cmd-left-arrow and cmd-right-arrow (without shift) key bindings to the mac os x Terminal | |
app if the Lion install removed this bindings from your system. | |
1) Open "System Preferences". | |
2) Go to "Keyboard". | |
3) Select the "Keyboard Shortcuts" tab. | |
4) Select "Application Shortcuts" from the list of items in the left. | |
5) Press "+" to add a new shurtcut. | |
6) As "Application" select "Terminal", as "Menu Title" use: "Select Next Tab". For the "Keyboard Shortcut" field just select the field and press cmd-right-arrow. | |
7) Repeat again from step 5, using "Select Previous Tab" as Menu Title and pressing cmd-left-arrow as keyboard shortcut. |
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
http_simple (/bytes/1024) over 1-gbit network, with 700 concurrent connections: | |
------------------------------------------------------------------------------ | |
windows-0.5.4 : 3869 r/s | |
windows-latest : 4990 r/s | |
linux-latest-legacy : 5215 r/s | |
linux-latest-uv : 4970 r/s |
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 arr = [], | |
obj = {'abcdef' : 1, 'qqq' : 13, '19' : [1, 2, 3, 4]}; | |
for(var i = 0; i < 5000; i++) | |
arr.push(obj); | |
// jsondb(arr) looks something like this: | |
// ["abcdef", "qqq", "19", [1, 13, [1, 2, 3, 4]], [1, 13, [1, 2, 3, 4]]...] | |
> JSON.stringify(arr).length //original |
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
### | |
# An implementation of the msgpack serialization format - http://msgpack.org/ | |
# By Devon Govett | |
# MIT LICENCE | |
### | |
class MsgPack | |
idx = 0 | |
@pack: (data, byteArray = false) -> |
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
// http://twitter.com/#!/littlecalculist/status/89848378682392576 | |
// http://twitter.com/#!/littlecalculist/status/89855977838485504 | |
// Unary Array.from() | |
Array.from = function( arrayish ) { | |
return [].slice.call( arrayish ); | |
}; |
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 console.log that won't leave you hanging when node exits | |
*/ | |
console.log = function(d) { | |
var res = process.stdout.write(d + '\n'); | |
// this is the first time stdout got backed up | |
if (!res && !process.stdout.pendingWrite) { | |
process.stdout.pendingWrite = true; |
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
machine github.com | |
login technoweenie | |
password SECRET | |
machine api.github.com | |
login technoweenie | |
password SECRET |
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 define(name, fn) { | |
if (!defs) { defs = {}; } | |
defs[name] = fn; | |
} | |
function require(name) { | |
console.log("Loading " + name); | |
if (modules && modules.hasOwnProperty(name)) return modules[name]; | |
if (defs && defs.hasOwnProperty(name)) { | |
if (!modules) { modules = {}; } | |
var fn = defs[name]; |