Skip to content

Instantly share code, notes, and snippets.

Avatar

Zev Ross zross

View GitHub Profile
@zross
zross / HTML: boilerplate
Created Apr 4, 2013
HTML: boilerplate w jquery
View HTML: boilerplate
<!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 Apr 4, 2013
SUBLIME: file/folder exclude
View gist:5310834
{
"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 Apr 5, 2013
jQuery: Document ready
View gist:5322318
$(document).ready(function(){
});
@zross
zross / modern.js
Last active Dec 17, 2015
JavaScript: Modernizr-SVG
View modern.js
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 Sep 25, 2013
HTML: Google map boilerplate (full screen)
View index.html
<!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 Dec 23, 2015
HTML: working D3 with SQL: CartoDB, create rects
View index.html
<!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 Dec 23, 2015
HTML: D3, topojson, add NYS counties from US county file
View index.html
<!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 Apr 17, 2017
HTML: D3 scatter, data from cartodb
View index.html
<!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 Sep 25, 2013
HTML: D3 simple boilerplate with jquery
View index.html
<!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 Oct 26, 2017
HTML: Google maps with CartoDB (v3) layer, includes cartoCSS (CA counties)
View index.html
<!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>