BOOM Analytics: Exploring Data-Centric, Declarative Programming for the Cloud
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
#define RSA_BITS 2048 | |
#define RSA_BYTES (RSA_BITS/8) | |
#define DIGIT uint32_t | |
#define DIGIT_BITS (sizeof(DIGIT)*8) | |
#define DIGIT_MAX ((DIGIT)(-1)) | |
#define NDIGITS (RSA_BITS/DIGIT_BITS) | |
static int b_add(DIGIT * restrict r, DIGIT * restrict x, DIGIT * restrict y) | |
{ |
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
------------------------------------ | |
-- basic TLS/SSL3.1 implementation | |
-- $Id: ssl.lua,v 1.13 2006-12-02 21:25:58 kt Exp $ | |
------------------------------------ | |
require "clua" | |
require "util" |
- Install a base server with open ssh server enabled.
- Update the OS.
sudo apt-get update
sudo apt-get upgrade
- Install developement tools.
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
# how to build luvit on windows7 x64 | |
## setup msysgit | |
http://code.google.com/p/msysgit/ | |
download and execute | |
Git-1.7.11-preview20120710.exe | |
installation target: C:\msysgit |
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
local Path = require('path') | |
local FS = require('fs') | |
local function search(code, pattern) | |
local data = {} | |
for pos, k, v in code:gmatch(pattern) do | |
local sub = code:sub(1, pos) | |
local comment = sub:match("\n-- ([^\n]+)\n$") | |
if not comment then | |
local long = sub:match("\n--%[(%b[])%]\n$") |
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
module.exports = TwoStep; | |
var slice = Array.prototype.slice; | |
function Group(callback) { | |
this.args = [null]; | |
this.left = 0; | |
this.callback = callback; | |
this.isDone = false; | |
} |
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
Creationix.route("GET", "/", function (req, res, params, next) { | |
render("frontindex", { | |
title: query("index", "title"), | |
links: query("index", "links"), | |
articles: loadArticles | |
}, function (err, html) { | |
if (err) return next(err); | |
res.writeHead(200, { | |
"Content-Length": Buffer.byteLength(html), | |
"Content-Type": "text/html; charset=utf-8" |
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
// glMatrix v0.9.5 | |
glMatrixArrayType=typeof Float32Array!="undefined"?Float32Array:typeof WebGLFloatArray!="undefined"?WebGLFloatArray:Array;vec3={};vec3.create=function(a){var b=new glMatrixArrayType(3);if(a){b[0]=a[0];b[1]=a[1];b[2]=a[2]}return b};vec3.set=function(a,b){b[0]=a[0];b[1]=a[1];b[2]=a[2];return b};vec3.add=function(a,b,c){if(!c||a==c){a[0]+=b[0];a[1]+=b[1];a[2]+=b[2];return a}c[0]=a[0]+b[0];c[1]=a[1]+b[1];c[2]=a[2]+b[2];return c}; | |
vec3.subtract=function(a,b,c){if(!c||a==c){a[0]-=b[0];a[1]-=b[1];a[2]-=b[2];return a}c[0]=a[0]-b[0];c[1]=a[1]-b[1];c[2]=a[2]-b[2];return c};vec3.negate=function(a,b){b||(b=a);b[0]=-a[0];b[1]=-a[1];b[2]=-a[2];return b};vec3.scale=function(a,b,c){if(!c||a==c){a[0]*=b;a[1]*=b;a[2]*=b;return a}c[0]=a[0]*b;c[1]=a[1]*b;c[2]=a[2]*b;return c}; | |
vec3.normalize=function(a,b){b||(b=a);var c=a[0],d=a[1],e=a[2],g=Math.sqrt(c*c+d*d+e*e);if(g){if(g==1){b[0]=c;b[1]=d;b[2]=e;return b}}else{b[0]=0;b[1]=0;b[2]=0;return b}g=1/g;b[0]=c*g;b[1]=d*g;b[2]=e*g;return b};vec3.cross=function(a,b,c |
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
startup.customRuntimeMain = function () { | |
var path = NativeModule.require('path'); | |
var custom = path.resolve(process.cwd(), process.argv[0] + ".js"); | |
if (!path.existsSync(custom)) return; | |
process.argv[1] = custom; | |
}; |