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
let fTable = | |
let rec factorial prev pos = seq { | |
let current = prev * pos | |
yield current | |
yield! factorial current (pos + 1) | |
} | |
factorial 1 1 |
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
using System; | |
using System.IO; | |
using System.Text; | |
using System.Text.RegularExpressions; | |
using System.Xml; | |
using System.Xml.Serialization; | |
namespace ConsoleApplication1 | |
{ | |
class Program |
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
#include <stdlib.h> | |
#include <string.h> | |
int main(int argc, char* argv[]) { | |
if (argc > 1) { | |
char* arg = argv[1]; | |
char cmdprefix[] = "node app.js -channel demo -url "; | |
char* cmd = (char*)malloc( | |
strlen(cmdprefix) + strlen(arg) + 1 | |
/* \0 */ |
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
#!/bin/bash | |
export GIT_WORK_TREE=/var/www/project | |
git checkout -f | |
pushd $GIT_WORK_TREE | |
npm install | |
NODE_ENV=production forever restart server.js | |
popd |
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
.git | |
node_modules |
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
Client count: 5, node version: 0.8.11, server version: 2.4.17, parser: hiredis | |
PING, 1/5 min/max/avg/p95: 0/ 8/ 0.08/ 1.00 1620ms total, 12345.68 ops/sec | |
PING, 50/5 min/max/avg/p95: 0/ 7/ 1.75/ 3.00 703ms total, 28449.50 ops/sec | |
PING, 200/5 min/max/avg/p95: 1/ 14/ 6.65/ 11.00 667ms total, 29985.01 ops/sec | |
PING, 20000/5 min/max/avg/p95: 37/ 361/ 201.48/ 317.55 385ms total, 51948.05 ops/sec | |
SET small str, 1/5 min/max/avg/p95: 0/ 8/ 0.08/ 1.00 1760ms total, 11363.64 ops/sec | |
SET small str, 50/5 min/max/avg/p95: 0/ 6/ 1.96/ 3.00 786ms total, 25445.29 ops/sec | |
SET small str, 200/5 min/max/avg/p95: 0/ 14/ 6.85/ 11.00 687ms total, 29112.08 ops/sec | |
SET small str, 20000/5 min/max/avg/p95: 36/ 406/ 229.36/ 368.00 429ms total, 46620.05 ops/sec | |
SET small buf, 1/5 min/max/avg/p95: 0/ 7/ 0.12/ 1.00 2508ms total, 7974.48 ops/sec |
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
Client count: 5, node version: 0.8.11, server version: 2.4.17, parser: hiredis | |
PING, 1/5 min/max/avg/p95: 0/ 4/ 0.08/ 1.00 1719ms total, 11634.67 ops/sec | |
PING, 50/5 min/max/avg/p95: 0/ 6/ 1.24/ 2.00 497ms total, 40241.45 ops/sec | |
PING, 200/5 min/max/avg/p95: 1/ 9/ 4.47/ 7.00 449ms total, 44543.43 ops/sec | |
PING, 20000/5 min/max/avg/p95: 49/ 440/ 250.05/ 397.65 457ms total, 43763.68 ops/sec | |
SET small str, 1/5 min/max/avg/p95: 0/ 3/ 0.09/ 1.00 1792ms total, 11160.71 ops/sec | |
SET small str, 50/5 min/max/avg/p95: 0/ 3/ 1.28/ 2.00 515ms total, 38834.95 ops/sec | |
SET small str, 200/5 min/max/avg/p95: 0/ 10/ 4.75/ 7.00 478ms total, 41841.00 ops/sec | |
SET small str, 20000/5 min/max/avg/p95: 50/ 653/ 355.20/ 596.65 674ms total, 29673.59 ops/sec | |
SET small buf, 1/5 min/max/avg/p95: 0/ 17/ 0.16/ 1.00 3355ms total, 5961.25 ops/sec |
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
Array.prototype.forEachAsync = function (callback, complete) { | |
var raiseComplete/*: (arg?: bool) => void*/ = complete ? (function (arg) { | |
complete(arg); | |
}) : (function () { }); | |
function next (self, index, length) { /* rec */ | |
if (index === length) { | |
raiseComplete(true); | |
} else { | |
process.nextTick(function () { |
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
#0 0xf7fdb430 in __kernel_vsyscall () | |
#1 0xf7d0426f in raise () from /lib32/libc.so.6 | |
#2 0xf7d077c5 in abort () from /lib32/libc.so.6 | |
#3 0x083570b8 in v8::Shell::System (args=...) at src/d8-posix.cc:460 | |
#4 0x0809bf16 in v8::internal::HandleApiCallHelper<false> (args=..., | |
isolate=0x85240b8) at src/builtins.cc:1128 | |
#5 0x08096ff0 in v8::internal::Builtin_Impl_HandleApiCall (args=..., | |
isolate=0x85240b8) at src/builtins.cc:1145 | |
#6 0x08096fcf in v8::internal::Builtin_HandleApiCall (args=..., | |
isolate=0x85240b8) at src/builtins.cc:1144 |
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
TYPESCRIPT_HOST=node | |
BASE= ./ | |
BIN=$(BASE)bin | |
BUILT=$(BASE)built | |
BUILT_LOCAL=$(BUILT)/local | |
BUILT_LOCALTEST=$(BUILT)/localtest | |
HOST=$(TYPESCRIPT_HOST) |