This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.idea/ | |
*.iml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: mit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function celebrate(el) { | |
if (doesSupportEmoji() === false) { | |
// browser does not support emoji, provide a fallback if you like | |
return; | |
} | |
var can = document.createElement('canvas'); | |
var ctx = can.getContext('2d'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: mit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This script should be run with Node.js | |
var short = generateDummy(100); | |
var med = generateDummy(10000); | |
var long = generateDummy(1000000); | |
console.info('Big loop:'); | |
test(short, bigLoop); | |
test(med, bigLoop); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: mit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
<style id="jsbin-css"> | |
.chapter-illo { | |
width: 100%; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Written by Elliot Bentley, inspired by http://stackoverflow.com/a/3028037 | |
$.fn.clickAnywhereElse = function(callback) { | |
var className = '.'+this.attr('class').replace(/ /g,'.'); | |
$('html').click(function(event){ | |
if ( !$(event.target).closest( className ).length ) { | |
callback(); | |
} | |
}); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var json = 'http://wsjgraphics.cartodb.com/api/v2/viz/8e5d6502-c098-11e3-8209-0edbca4b5057/viz.json'; | |
m3({ | |
mapId: 'nmap', | |
json: json, | |
center_lat: 49, | |
center_lon: 36, | |
zoom: 5, | |
maxZoom: 7, | |
minZoom: 4, |