Learning Backbone.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
<!DOCTYPE> | |
<html> | |
<head></head> | |
<body> | |
<p>Start the worker from the browser console (fire up a CPU monitor to | |
have some sort of visual feedback)</p> | |
<pre>worker.postMessage("run")</pre> | |
<p>you will NOT be able to stop it with</p> | |
<pre>worker.postMessage("stop")</pre> | |
<p>What I'd expected:</p> |
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 uuid = require('node-uuid'), // npm install node-uuid | |
crypto = require('crypto'); | |
var UUID_NUM = 1000000; | |
var uuid_table = {}; | |
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
function partial_reverse (arr, i, j) | |
{ | |
var tmp; | |
j--; | |
while (i < j) { | |
tmp = arr[i]; | |
arr[i] = arr[j]; | |
arr[j] = tmp; | |
i++; j--; |
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
<!DOCTYPE> | |
<html> | |
</html> |
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 http = require("http"), | |
url = require("url"); | |
var server = http.createServer(function (req, res) { | |
console.log("connection count:" + server.connections); | |
var fwd_url = url.parse(req.url), | |
fwd_req_opts = { | |
agent: false, | |
host: fwd_url.hostname, |
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
// This module should listen for http requests to a given URL and output an RSS feed. | |
var connect = require("connect"); | |
connect.createServer( | |
connect.logger(), | |
connect.router(routes) | |
).listen(8080); |

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
<!-- TODO --> |
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
body { | |
font-family: Helvetica, "sans-serif" | |
} |
OlderNewer