Hourly solar analemmas (ignoring daylight savings time) as seen from San Francisco in 2014.
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 f = document.createElement("form"); | |
f.method = "POST"; | |
f.action = "/fork" + location.pathname; | |
f.appendChild(document.querySelector("input[name=authenticity_token]")); | |
f.submit(); |
Want to fork your own gists? No fork button? No problem! Install this user script by clicking refork.user.js' "raw" link down below: ⇓
These tools inject a breakpoint, console.log
or console.count
in any function you want to spy on via
stopBefore('Element.prototype.removeChild')
or ditto stopAfter
, logBefore
/ logAfter
/ logAround
/ logCount
.
Works in Chrome DevTools and Safari Inspector; Firefox dev tools reportedly less so.
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 http-equiv="Content-Type" content="text/html;charset=utf-8"/> | |
<title>d3.js Spinny Globe from Mike Bostock's SVG Open 2011 keynote</title> | |
<script src="http://mbostock.github.com/d3/d3.js"></script> | |
<script src="http://mbostock.github.com/d3/d3.geo.js"></script> | |
<link type="text/css" rel="stylesheet" href="http://mbostock.github.com/d3/talk/20111018/style.css"/> | |
<link type="text/css" rel="stylesheet" href="http://mbostock.github.com/d3/talk/20111018/colorbrewer/colorbrewer.css"/> | |
<style type="text/css"> |
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 http-equiv="content-type" content="text/html;charset=utf-8"> | |
<title>Index of all bl.ocks.org pages owned by a github user</title> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js?2.0.3"></script> | |
<base target="_top"> | |
<style> | |
body { padding: 0.5em; margin: 0; } | |
h1 { padding: 0; margin: 0; } |
The current solar terminator (the non-sunlit part of the Earth) is shown in blue. (Origin: Ben Elsen’s fix of Mike Bostock’s original)
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
/* Here's how to add a coloured marker to a Google Map with a shadow in the | |
right place. | |
The pin itself used to be dynamically generated via Google Charts: | |
//chart.apis.google.com/chart?chst=d_map_pin_letter&chld=|3491FF|000000 | |
documented here: | |
https://developers.google.com/chart/image/docs/gallery/dynamic_icons | |
Note however that this API was marked as deprecated on April 20th 2012 | |
although it's not clear when or if it will be turned off. |
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
// http://www.html5rocks.com/en/tutorials/file/dndfiles/ | |
d3.select('svg') | |
.on('dragover', handleDragOver) | |
.on('drop', handleFileSelect) | |
; | |
function handleFileSelect() { | |
var event = d3.event | |
, files = event.dataTransfer.files // FileList object | |
, about = [] |
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: gpl-3.0 |
NewerOlder