Skip to content

Instantly share code, notes, and snippets.

@tonyfast
tonyfast / README.md
Last active August 29, 2015 14:11
Load Structured Data in Gist and Parse the Markdownified text with Moustache notation

This combines handlebars and markdown to put content into context.

@tonyfast
tonyfast / query.js
Created December 16, 2014 20:14
Get Query Parameters from url
function getQueryParameters(str) {
// from http://css-tricks.com/snippets/jquery/get-query-params-object/
return (str || document.location.search).replace(/(^\?)/,'').split("&").map(function(n){return n = n.split("="),this[n[0]] = n[1],this}.bind({}))[0];
}
@tonyfast
tonyfast / index.html
Last active August 29, 2015 14:13
Create a very, very simple table using Jquery
<head>
<!-- Latest compiled and minified CSS -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
<!-- Optional theme -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap-theme.min.css">
<script src="https://code.jquery.com/jquery-2.1.3.min.js"></script>
<script src="table.js"></script>
<script>
$(document).ready( $.get('sample.csv', null, CreateTable ) );
@tonyfast
tonyfast / README.md
Last active August 29, 2015 14:13
Dynamically create an iframe using a string
@tonyfast
tonyfast / README.md
Last active August 29, 2015 14:14 — forked from mbostock/.block
Collapsible tree with dict-like object

An interactive version of a Reingold–Tilford tree. Click on the nodes to expand or collapse.

Modifications

Very minor tweaks were made to create a collapsible tree of a dict-like object.

  • The dict is converted to the flare.json tree structure with a default size.
  • I added a subset of a gist API response because that is what I am working on.
  • I added lodash because the tree converter was already written.
@tonyfast
tonyfast / README.md
Last active August 29, 2015 14:14
d3+handlebars+bootstrap

An interactive version of a Reingold–Tilford tree. Click on the nodes to expand or collapse.

Modifications

Very minor tweaks were made to create a collapsible tree of a dict-like object.

  • The dict is converted to the flare.json tree structure with a default size.
  • I added a subset of a gist API response because that is what I am working on.
  • I added lodash because the tree converter was already written.
@tonyfast
tonyfast / README.md
Last active August 29, 2015 14:14 — forked from bollwyvl/README.md
d3+riotjs

An interactive version of a Reingold–Tilford tree. Click on the nodes to expand or collapse.

Modifications

Very minor tweaks were made to create a collapsible tree of a dict-like object.

  • The dict is converted to the flare.json tree structure with a default size.
  • I added a subset of a gist API response because that is what I am working on.
  • I added lodash because the tree converter was already written.
@tonyfast
tonyfast / index.html
Last active August 29, 2015 14:14 — forked from bollwyvl/README.md
d3+flexbox table
<head>
<meta charset="utf-8">
<style>
@import "//cdn.jsdelivr.net/g/bootstrap(css/bootstrap.min.css)";
* {
-webkit-border-radius: 0 !important;
-moz-border-radius: 0 !important;
border-radius: 0 !important;
}
button{
@tonyfast
tonyfast / index.html
Last active August 29, 2015 14:14
Jade in the Browser
<head>
</head>
<body>
<script src="//cdn.jsdelivr.net/g/jade"></script>
<script id="template" type="jade/template">
h1 Jade - node template engine
#container.col
if youAreUsingJade
p You are amazing
else
@tonyfast
tonyfast / index.html
Last active August 29, 2015 14:14
d3 + color brewer + interaction
<head>
<style>
body{
background: black;
margin: 0px;
}
div{
font-size: 72px;
text-align : center;
margin-left: auto;