Skip to content

Instantly share code, notes, and snippets.

View zross's full-sized avatar

Zev Ross zross

View GitHub Profile
@zross
zross / HTML: boilerplate
Created April 4, 2013 13:23
HTML: boilerplate w jquery
<!DOCTYPE html>
<html>
<head>
<title>HTML5</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=650, user-scalable=yes">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
<!--[if IE]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
@zross
zross / gist:5310834
Created April 4, 2013 14:32
SUBLIME: file/folder exclude
{
"folders":
[
{
"path": "/C/wamp/www/sublime3",
"file_exclude_patterns": ["*.png", "*.xml", "*.ico", "*.md", "*.txt", "*.git*", "404.html", ".htaccess"]
// "folder_exclude_patterns":["js"]
}
]
@zross
zross / gist:5322318
Created April 5, 2013 20:20
jQuery: Document ready
$(document).ready(function(){
});
@zross
zross / modern.js
Last active December 17, 2015 03:28
JavaScript: Modernizr-SVG
if (!Modernizr.svg) {
$('.countyname')
.addClass('svgError')
.html("Your browser does not support " +
"the interactive graphics on this page. Interactive " +
"graphics have been replaced with a static image.");
$('.mapcontainer').append('<img src="images/map.png">');
throw 'SVG not supported';
}
@zross
zross / index.html
Created September 25, 2013 13:24
HTML: Google map boilerplate (full screen)
<!DOCTYPE html>
<html>
<head>
<title>HTML5</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=650, user-scalable=yes">
<!--[if IE]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
@zross
zross / index.html
Last active December 23, 2015 21:59
HTML: working D3 with SQL: CartoDB, create rects
<!DOCTYPE html>
<html>
<head>
<title>HTML5</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=650, user-scalable=yes">
<script src="http://d3js.org/d3.v3.min.js"></script>
<script src="http://libs.cartocdn.com/cartodb.js/v2/cartodb.js">
</script>
<style>
@zross
zross / index.html
Last active December 23, 2015 21:59
HTML: D3, topojson, add NYS counties from US county file
<!DOCTYPE html>
<meta charset="utf-8">
<script src="http://d3js.org/d3.v3.min.js"></script>
<script src="http://d3js.org/queue.v1.min.js"></script>
<script src="http://d3js.org/topojson.v1.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/vendor/jquery-1.8.3.min.js"><\/script>')</script>
@zross
zross / index.html
Last active April 17, 2017 05:16
HTML: D3 scatter, data from cartodb
<!DOCTYPE html>
<html>
<head>
<title>HTML5</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=650, user-scalable=yes">
<script src="http://d3js.org/d3.v3.min.js"></script>
<script src="http://libs.cartocdn.com/cartodb.js/v2/cartodb.js">
</script>
<style>
@zross
zross / index.html
Created September 25, 2013 14:33
HTML: D3 simple boilerplate with jquery
<!DOCTYPE html>
<html>
<head>
<title>HTML5</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=650, user-scalable=yes">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
<script src="http://d3js.org/d3.v3.min.js"></script>
<!--[if IE]>
@zross
zross / index.html
Last active October 26, 2017 17:46
HTML: Google maps with CartoDB (v3) layer, includes cartoCSS (CA counties)
<!DOCTYPE html>
<html>
<head>
<title>HTML5</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=650, user-scalable=yes">
<!--[if IE]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>