Underscore example:
_.each([1, 2, 3], function(num) { alert(num); });
// Languages: name (local), name_en, name_fr, name_es, name_de | |
@name: '[name_en]'; | |
@sans: 'Mark Offc Pro Regular', 'Arial Unicode MS Regular'; | |
@sans_it: 'Mark Offc Pro Italic', 'Arial Unicode MS Regular'; | |
@serif_md: 'Mark Offc Pro Bold', 'Arial Unicode MS Regular'; | |
@sans_bold: 'Mark Offc Pro Bold', 'Arial Unicode MS Regular'; | |
#country_label { |
<!doctype html> | |
<meta charset="utf-8"> | |
<body> | |
<style media="screen"> | |
body { | |
margin: 0; | |
} | |
.supermarket { | |
fill: red; |
license: gpl-3.0 |
license: mit |
var Sankey = function(opts) { | |
this.opts = opts; | |
this.el = $("#" + this.opts.el); | |
this.graphsReady = 0; | |
this.graphWidth = this.el.width(); | |
}; | |
Sankey.prototype.initPaper = function() { | |
this.paper = Raphael(document.getElementById(this.opts.el)); | |
}; |
# Bulk convert shapefiles to geojson using ogr2ogr | |
# For more information, see http://ben.balter.com/2013/06/26/how-to-convert-shapefiles-to-geojson-for-use-on-github/ | |
# Note: Assumes you're in a folder with one or more zip files containing shape files | |
# and Outputs as geojson with the crs:84 SRS (for use on GitHub or elsewhere) | |
#geojson conversion | |
function shp2geojson() { | |
ogr2ogr -f GeoJSON -t_srs crs:84 "$1.geojson" "$1.shp" | |
} |
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<body> | |
<div id="map"></div> | |
<script src="http://d3js.org/d3.v3.min.js"></script> | |
<script src="http://d3js.org/topojson.v1.min.js"></script> | |
<script src="http://api.tiles.mapbox.com/mapbox.js/v1.0.3/mapbox.js"></script> | |
<link href='http://api.tiles.mapbox.com/mapbox.js/v1.0.3/mapbox.css' rel='stylesheet' /> | |
<style> | |
body { margin:0; padding:0; } |
doInstall <- TRUE # Change to FALSE if you don't want packages installed. | |
toInstall <- c("jpeg", "reshape2", "ggplot2") | |
if(doInstall){install.packages(toInstall, repos = "http://cran.r-project.org")} | |
lapply(toInstall, library, character.only = TRUE) | |
# Image URL: | |
allImageURLs <- c("http://media.charlesleifer.com/blog/photos/thumbnails/akira_940x700.jpg", | |
"http://upload.wikimedia.org/wikipedia/commons/thumb/e/ec/Mona_Lisa%2C_by_Leonardo_da_Vinci%2C_from_C2RMF_retouched.jpg/402px-Mona_Lisa%2C_by_Leonardo_da_Vinci%2C_from_C2RMF_retouched.jpg", | |
"http://upload.wikimedia.org/wikipedia/commons/thumb/e/e9/Official_portrait_of_Barack_Obama.jpg/441px-Official_portrait_of_Barack_Obama.jpg", | |
"http://cache.boston.com/universal/site_graphics/blogs/bigpicture/obama_11_05/obama22_16604051.jpg", |