Skip to content

Instantly share code, notes, and snippets.

@cgvarela
cgvarela / mesos_arm.md
Created November 10, 2015 09:43 — forked from moderation/mesos_arm.md
Compile Apache Mesos 0.22 for Raspberry Pi 2

How to compile Mesos on your new Raspberry Pi 2 (which is amazing with 4 cores and 6x performance). Follows on from experiments in compiling for OS X

sudo apt-get install maven libsasl2-dev libapr1-dev libsvn-dev libcurl4-openssl-dev python-dev python-boto

export JAVA_HOME="/usr/lib/jvm/jdk-8-oracle-arm-vfp-hflt"
export PATH=$JAVA_HOME/bin:$PATH

http://likemagicappears.com/projects/raspberry-pi-cluster/mesos-on-raspbian/

@cgvarela
cgvarela / amzn.csv
Created October 1, 2015 14:10 — forked from lebek/amzn.csv
Responsive Visualizations: Basic Graph
date close
2014-02-07 361.08
2014-02-06 354.59
2014-02-05 346.45
2014-02-04 347.95
2014-02-03 346.15
2014-01-31 358.69
2014-01-30 403.01
2014-01-29 384.2
2014-01-28 394.43
@cgvarela
cgvarela / JS-Detect-Browser.js
Created September 28, 2015 06:11
Detect what browser we are in and do a focus/blur based on the browser window. (uses jquery.browser.js and modernizr.js)
if($.browser.msie && parseInt($.browser.version) <= 8){ // just for IE8 and lower
$(document).on('focusout', windowBlurred);
$(document).on('focusin', windowFocused);
}else if($.browser.safari && Modernizr.touch && !navigator.userAgent.match(/Android/i) && !navigator.userAgent.match(/CriOS/i)){ // just for ipad / iphone / ipod (Safari mobile, not Android default browsers nor Chrome Mobile that is)
$(window).on('pagehide', windowBlurred);
$(window).on('pageshow', windowFocused);
}else{ // the rest
console.log('chrome');
$(window).on('blur', windowBlurred);
$(window).on('focus', windowFocused);