This Gist is similar to https://gist.github.com/noteed/8656989 which uses Open vSwitch instead of Tinc.
Download the install.sh script and run it:
> https://gist.githubusercontent.com/noteed/11031504/raw/install.sh
| #!/bin/bash | |
| # Cloud-config for CoreOS IPXE deployment on Vultr | |
| ################################################## | |
| # This cloud-config bootstraps CoreOS on /dev/vda and provisions: | |
| # - private ip-address on eth1 | |
| # - etcd on private network | |
| # - fleet on private network | |
| # - basic firewall (docker compatible) | |
| # - SSHd security hardening | |
| ################################################## |
| JS = $(wildcard scripts/*.js) | |
| all: game.js game.js.map game.css rules.html | |
| game.js: $(JS) | |
| game.js.map: $(JS) | |
| %.js %.js.map: | |
| closure-compiler --js $(JS) --js_output_file $*.js --create_source_map $*.js.map --source_map_format V3 |
| measure = (t, f) -> | |
| s = new Date() | |
| s = s.getTime() | |
| ret = f() | |
| e = new Date() | |
| console.log t, e.getTime() - s, ret | |
| test1 = -> | |
| r = 0 | |
| for x in a |
This Gist is similar to https://gist.github.com/noteed/8656989 which uses Open vSwitch instead of Tinc.
Download the install.sh script and run it:
> https://gist.githubusercontent.com/noteed/11031504/raw/install.sh
| <?php | |
| //Found on http://www.alternateinterior.com/2007/05/multi-threading-strategies-in-php.html | |
| //Modified by http://www.php-code.net | |
| //Modified: add executor | |
| class Thread { | |
| var $pref ; // process reference | |
| var $pipes; // stdio | |
| var $buffer; // output buffer | |
| var $output; | |
| var $error; |
From https://gist.github.com/3050224
From http://blog.smartcore.net.au/smartos-the-basics/
From https://gist.github.com/3050224
From http://blog.smartcore.net.au/smartos-the-basics/
| // define these shard spaces | |
| shardSpaces = [ | |
| {name: "raw", retention: "4h"}, | |
| {name: "week", retention: "7d"}, | |
| {name: "month", retention: "30d"}, | |
| {name: "year", retention: "365d"}, | |
| {name: "keep", retention: "inf"} | |
| ] | |
| // apply these rules for mapping data to shard spaces |
| (function () { | |
| "use strict"; | |
| var fs = require('fs'), | |
| iterations = 0, | |
| work = function (callback) { | |
| var buffer = '', | |
| i; |
| A | |
| a | |
| aa | |
| aal | |
| aalii | |
| aam | |
| Aani | |
| aardvark | |
| aardwolf | |
| Aaron |