I hereby claim:
- I am jinroh on github.
- I am pierreg (https://keybase.io/pierreg) on keybase.
- I have a public key whose fingerprint is 1F8F 68E6 4101 8BBF 5B9B 7FFA A573 5589 4506 960E
To claim this, I am signing this object:
var _ = require('lodash'); | |
var Promise = require('bluebird'); | |
var sax = require('sax'); | |
var manifest = require("raw!./manifest.xml"); | |
function domParser() { | |
function parseStreamIndex(el) { | |
var index = []; | |
if (!el) { return; } | |
var cdren = el.children; |
I hereby claim:
To claim this, I am signing this object:
# in this algorithm, all notions of *sorting*, *close* or *distance* | |
# are relative to the XOR distance with the target ID | |
# as defined in the Kademlia spec | |
- iterative find (target ID) -> | |
# INITIALIZATIONS | |
HeardOf <- XOR Sorted Array of peers | |
initialized with the 50 (or less) closest peers we know from the our routing table | |
Reached <- XOR Sorted Array of peers | |
Queried <- Array of peers |
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'redcarpet' | |
require 'albino' | |
class SyntaxRenderer < Redcarpet::Render::HTML | |
def initialize(options) | |
super options | |
@style = options[:style] |
var lookup = function(target) { | |
var send = function() { /* ... */ }, | |
iterative = new IterativeFind(), | |
init = new XORSortedPeerArray().relativeNodeID(target), | |
staled = false; | |
function map(peer) { | |
var rpc = new FindNodeRPC(peer, this._target); | |
send(rpc); | |
return rpc; |
/** | |
* The sample usage of ECMA 5 Mozilla Features Implemented in V8 | |
* https://github.com/joyent/node/wiki/ECMA-5-Mozilla-Features-Implemented-in-V8 | |
* You can use thease new feature of ECMA5 on Node.js as you like. | |
* because there is no IE :) | |
* Order is deferent form original wiki. | |
* Sources are Checked on Node.js v0.5.0(unstable), v0.4.9(stable) | |
* | |
* you can execute this file. | |
* $ node ecma5_on_v8.js |
// Let `doAjax`, `fadeIn`, `fadeOut`, and `delay` be promise-returning functions. | |
// In all the following examples, `example` is meant to return a promise that is fulfilled when | |
// all operations are completed, or rejected if any of the steps fail. | |
// ES5 | |
function example() { | |
return doAjax("data.json").then(function (data) { | |
document.getElementById("data").innerText = data; |
eventsource | |
go-eventsource | |
client/client |
BenchmarkRandomStringA-4 2000000 702 ns/op | |
BenchmarkRandomStringB-4 10000000 120 ns/op | |
BenchmarkRandomStringC-4 20000000 115 ns/op | |
BenchmarkRandomStringD-4 10000000 121 ns/op |
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<script src="http://d3js.org/d3.v3.min.js"></script> | |
<style> | |
body { | |
font: 10px sans-serif; | |
} | |
#main { |