Skip to content

Instantly share code, notes, and snippets.

@AoJ
AoJ / vultr-coreos-bootstrap.sh
Created September 27, 2015 21:03 — forked from janeczku/vultr-coreos-bootstrap.sh
Cloud-config for CoreOS IPXE deployment on Vultr. Provisioning etcd, fleet, private network and docker compatible firewall.
#!/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
##################################################
@AoJ
AoJ / Makefile
Created September 24, 2015 13:22 — forked from jdp/Makefile
makefile/procfile ultimate front end combo
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
@AoJ
AoJ / test.coffee
Last active September 9, 2015 10:51
Simple perf test of loops
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
@AoJ
AoJ / docker-tinc.md
Last active August 29, 2015 14:22 — forked from noteed/docker-tinc.md
@AoJ
AoJ / Thread.php
Last active August 29, 2015 14:19 — forked from Arbow/Thread.php
<?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;
// 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;
@AoJ
AoJ / words
Last active August 29, 2015 14:06 — forked from anonymous/words
This file has been truncated, but you can view the full file.
A
a
aa
aal
aalii
aam
Aani
aardvark
aardwolf
Aaron