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
GET /live/smil:etv.smil/playlist.m3u8 HTTP/1.1 | |
Host: wowza4.err.ee | |
Accept-Encoding: gzip, deflate | |
Accept: */* | |
Accept-Language: en-us | |
Connection: keep-alive | |
User-Agent: ERR/1.3 CFNetwork/711.3.18 Darwin/14.0.0 | |
HTTP/1.1 200 OK |
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 secure_rand(min, max) { | |
var rval = 0; | |
var range = max - min; | |
if (range < 2) { | |
return min; | |
} | |
var bits_needed = Math.ceil(Math.log2(range)); | |
if (bits_needed > 53) { | |
throw new Exception("We cannot generate numbers larger than 53 bits."); |
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
$ node --expose-gc node_string_primitive_test.js | |
before var a mem_rss=11.9MB mem_heap_total=3.9MB mem_heap_used=2.1MB | |
typeof a string | |
before making array mem_rss=12.5MB mem_heap_total=5.9MB mem_heap_used=1.8MB | |
after making array mem_rss=12.6MB mem_heap_total=5.9MB mem_heap_used=1.9MB | |
after gc mem_rss=12.6MB mem_heap_total=5.9MB mem_heap_used=1.9MB |
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
brew install zeromq | |
npm install debug blocked zmq | |
DEBUG=* node zmq-test.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
var cluster = require("cluster"); | |
var blocked = require("blocked"); | |
var debug = require("debug"); | |
var workers; | |
if (cluster.isMaster) { | |
debug = debug("master-"+process.pid); | |
workers = {}; |
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
In Clojure (from Clojur Programming book, p94): | |
(defn random-ints | |
"Returns a lazy seq of random integers in the range [0,limit)." | |
[limit] | |
(lazy-seq | |
(cons (rand-int limit) | |
(random-ints limit)))) | |
(take 10 (random-ints 50)) |
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
global | |
daemon | |
maxconn 256 | |
defaults | |
log global | |
maxconn 256 | |
mode http | |
option forwardfor | |
option http-server-close |
NewerOlder