The orthographic projection is available as d3.geo.orthographic. See also the interactive version, the rotating versions and the animated world tour.
This file contains hidden or 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> | |
<meta charset="utf-8"> | |
<style> | |
.graticule { | |
fill: none; | |
stroke: #777; | |
} | |
.boundary { |
This file contains hidden or 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> | |
<a href='://bl.ocks.org/4644926'>bl.ocks.org/4644926</a> | |
<button id='another'>Another one</button> | |
<span id='xebal'></span> | |
<script> | |
// return random integer in [0,n-1] | |
function r(n) { | |
return Math.floor(n * Math.random()); | |
} |
This file contains hidden or 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> | |
<a href='://bl.ocks.org/4687301'>bl.ocks.org/4687301</a> | |
<button id='another'>Another one</button> | |
<span id='password'></span> | |
<script> | |
// return random integer in [0,n-1] | |
function r(n) { | |
return Math.floor(n * Math.random()); | |
} |
This file contains hidden or 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
<?xml version='1.0' encoding='utf-8'?> | |
<xsl:stylesheet version='1.0' | |
xmlns:xsl='http://www.w3.org/1999/XSL/Transform' | |
> | |
<xsl:output method='text'/> | |
<xsl:template match='text()'/> | |
<xsl:template match='*[ancestor::*]'> |
This file contains hidden or 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 pluslinks = document.querySelectorAll('a[href^="https://plus.google.com/"]'); | |
for (var i = 0; i < pluslinks.length; i++) { | |
var a = pluslinks[i]; | |
a.oldonclick = a.onclick; | |
a.onclick = function() { return false; }; | |
} |
This file contains hidden or 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
Options -Indexes | |
Options +ExecCGI | |
AddHandler cgi-script .cgi | |
AddHandler mapserver-map .map | |
Action mapserver-map /map/mapserver.cgi |
This file contains hidden or 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
convert \ | |
$in \ | |
-background none \ | |
-transparent $color1 \ | |
-transparent $color2 \ | |
-transparent $color3 \ | |
... | |
-flatten \ | |
$out |
This file contains hidden or 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
origin=.../foo.git | |
branch=master # "master" only makes sense if origin is empty bare repo | |
workdir=$(mktemp -d) | |
git clone $origin $workdir | |
cd $workdir | |
if git checkout --help | grep -q -e --orphan ; then | |
# --orphan added in 1.7.2? | |
git checkout --orphan $branch | |
else |
This file contains hidden or 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
# Based on http://stackoverflow.com/a/1189582 | |
readlink -f /proc/self/fd/${fd} | |
# A tty might show as "/dev/pts/##" |