Skip to content

Instantly share code, notes, and snippets.

{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "Builds an ECS Cluster",
"Parameters": {},
"Resources": {
"SpotFleet": {
"Type": "AWS::EC2::SpotFleet",
"Properties": {
"SpotFleetRequestConfigData": {
"AllocationStrategy": "diversified",
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "Builds an ECS Cluster",
"Parameters": {},
"Resources": {
"SpotFleet": {
"Type": "AWS::EC2::SpotFleet",
"Properties": {
"SpotFleetRequestConfigData": {
"AllocationStrategy": "diversified",
@yhahn
yhahn / index.js
Created July 31, 2015 17:16
murmur collision tests
var fnvplus = require('fnv-plus');
var murmur = require('murmur');
function collisionRate(bits) {
var hashes = {};
var texts = 0;
var collisions = [];
var sample = 1e6;
console.time(bits + ' bits');
while (texts < sample) {
@yhahn
yhahn / index.js
Last active August 29, 2015 14:26
fnv-plus collision tests
var fnvplus = require('fnv-plus');
function collisionRate(bits) {
var hashes = {};
var texts = 0;
var collisions = [];
var sample = 1e6;
while (texts < sample) {
var text = Math.random().toString(36);
var hash = fnvplus.hash(text,bits).hex();
@yhahn
yhahn / marker.png
Last active August 29, 2015 14:07
mapnik markersnapping testcase
marker.png
@yhahn
yhahn / ami.js
Last active August 29, 2015 14:06
Get latest trusty AMIs
var https = require('https');
var body = '';
https.get('https://cloud-images.ubuntu.com/locator/ec2/releasesTable', function(res) {
res.on('data', function(chunk) { body += chunk; });
res.on('end', finish);
});
function finish() {
// Bad JSON -- has trailing comma.
@yhahn
yhahn / 10.196.370.png
Last active August 29, 2015 14:05
solid vt testcase
10.196.370.png
@yhahn
yhahn / phrase-fnv1a32.txt
Last active December 27, 2015 14:29
carmen colllision tests
{"hash":"1047421","terms":["callejon de rojas","carrer santo tomas"]}
{"hash":"2080597","terms":["melin street","zelk lane"]}
{"hash":"2177846","terms":["gansz lane","wandel drive"]}
{"hash":"2857275","terms":["cavendish drice","elm wk"]}
{"hash":"4382878","terms":["profesora stanislawa lojasiewicza","tegel close"]}
{"hash":"9876508","terms":["beyer close","vanyo road"]}
{"hash":"10287211","terms":["billy london road","rua julio braido"]}
{"hash":"10760203","terms":["international drive","paul schuster strasse"]}
{"hash":"12498122","terms":["borslungvegen","sand hallow road"]}
{"hash":"13664186","terms":["turnuey ridge road","valley fork drive"]}
@yhahn
yhahn / map.geojson
Created August 20, 2013 21:00
via:geojson.io
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.