Skip to content

Instantly share code, notes, and snippets.

@sammyt
sammyt / keybase.md
Created July 19, 2019 17:37
keybase.md

Keybase proof

I hereby claim:

  • I am sammyt on github.
  • I am sammyt123 (https://keybase.io/sammyt123) on keybase.
  • I have a public key ASCNC_A_cx-eeH6a7SdRQiz-MiYg5IcLOYQdpVF3l2IB0Qo

To claim this, I am signing this object:

@sammyt
sammyt / d3_fn.js
Created November 8, 2015 12:33
composing d3 function into, functions
var d3_proto = d3.select(window);
function free(fn) {
return function() {
var args = _.toArray(arguments)
return function(selection) {
return fn.apply(selection, args)
}
}
@sammyt
sammyt / index.html
Created April 13, 2013 14:05
targeting multiple nodes with $
<html>
<head>
<meta charset="utf-8">
<title>Multiple Targets</title>
<script src="http://d3js.org/d3.v3.min.js"></script>
<script src="http://rawgithub.com/sammyt/see/master/src/see.js"></script>
</head>
<body></body>
@sammyt
sammyt / README.md
Last active December 16, 2015 04:29
creating nodes using see

The Generated HTML

<header>
  <nav>
    <ul>
      <li>here</li>
      <li>there</li>
      <li>everywhere</li>
 
@sammyt
sammyt / index.html
Last active December 10, 2015 17:48
using d3 to render a list with a template
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<script type="text/javascript" src="d3.js"></script>
<script type="text/javascript" src="list.js"></script>
<title>d3 demo</title>
</head>
<body onload="init()">
<ul>
@sammyt
sammyt / huhumm.js
Created May 19, 2012 10:33
Trying to improve the api
var cup = new Cup(data)
var map = cup.map
map(".first-name").to("firstName")
map(".last-name").to("lastName")
map("ul.friends")
.each("friends")