Skip to content

Instantly share code, notes, and snippets.

View commuterjoy's full-sized avatar

Matt Chadburn commuterjoy

View GitHub Profile
@commuterjoy
commuterjoy / ft-todo.md
Last active August 29, 2015 14:03
ft todo

A few things on my to-do list.

1/ Implement cluster API - http://nodejs.org/api/cluster.html

Can we get a simple demo application working with cluster based deployments on ft platform?

Some notes here - https://gist.github.com/jedi4ever/6079180

Clustering seems useful for, a) using multiple processors on the same machine, b) not having to rely on doing a forever restarts when you deploy, c) no-downtime deploys, and possibly d) dynamic scaling.

@commuterjoy
commuterjoy / body
Created May 29, 2013 14:23
Generate a report via the SiteCatalyst / Omniture API via Ruby & CURL
{
"reportDescription":{
"reportSuiteID":"<report-suite-id>",
"date":"2013-05-11",
"dateFrom":"",
"dateTo":"",
"dateGranularity":"hour",
"metrics":[
{
"id":"event37"
@madrobby
madrobby / gist:3202087
Created July 29, 2012 22:01
Fallback to PNG if SVG is not supported
<!-- example for the http://retinafy.me ebook -->
<style>
div.rss {
background: url(rss.svg);
width: 32px;
height: 32px;
}
body.no-svg div.rss {
<?
$a = (rand(0, 5) > 2) ? 'wet': 'very wet';
echo "<h1>$a</h1>";
?>
@m242
m242 / gist:1205631
Created September 9, 2011 06:43
Scala Option in JavaScript
var MyOption, Option;
Array.prototype.filter = function(f) {
var x, _i, _len, _results;
_results = [];
for (_i = 0, _len = this.length; _i < _len; _i++) {
x = this[_i];
if (f(x)) {
_results.push(x);
}