Skip to content

Instantly share code, notes, and snippets.

@stepheneb
stepheneb / index.html
Last active Apr 25, 2020
D3 Example: zoom, pan, and axis rescale
View index.html
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>One Graph</title>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.v2.js"></script>
<script type="text/javascript" src="simple-graph.js"></script>
<style type="text/css">
body { font: 13px sans-serif; }
rect { fill: #fff; }
@stepheneb
stepheneb / list-native-gems.rb
Created Dec 13, 2010
list RubyGems that have native extensions
View list-native-gems.rb
#!/usr/bin/env ruby
require 'rubygems'
gempaths = Gem::default_path
puts
puts "Scanning paths in Gem::default_path for RubyGems with native extensions ..."
puts
@stepheneb
stepheneb / .block
Created Feb 18, 2020 — forked from mbostock/.block
Pan & Zoom Axes
View .block
license: gpl-3.0
@stepheneb
stepheneb / .block
Last active Jan 14, 2020
Simple JavaScript benchmarking tool
View .block
height: 500
scrolling: yes
@stepheneb
stepheneb / index.html
Last active Jan 14, 2020 — forked from justincormack/index.html
HSL colors in D3.js v2
View index.html
<html>
<head>
<title>HSL Hues</title>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.v2.js"></script>
</head>
<body>
<p>HSL Hues: 0 .. 360 </p>
<svg id="hsl-hue1"></svg>
<p>HSL Hues: 0 .. 256 </p>
<svg id="hsl-hue2"></svg>
@stepheneb
stepheneb / d3.js
Last active Jan 14, 2020
D3 Example: Global Surface Temperature: 500 ... 2009
View d3.js
(function(){if (!Date.now) Date.now = function() {
return +new Date;
};
try {
document.createElement("div").style.setProperty("opacity", 0, "");
} catch (error) {
var d3_style_prototype = CSSStyleDeclaration.prototype,
d3_style_setProperty = d3_style_prototype.setProperty;
d3_style_prototype.setProperty = function(name, value, priority) {
d3_style_setProperty.call(this, name, value + "", priority);
@stepheneb
stepheneb / README.md
Last active Jan 14, 2020
Canvas Animate Path Benchmark
View README.md
@stepheneb
stepheneb / README.md
Last active Jan 14, 2020 — forked from mbostock/.block
Comparing interpolation in Lab and LCh color spaces.
View README.md
@stepheneb
stepheneb / index.html
Last active Jan 14, 2020
Lennard-Jones Potential in Interactive Graph
View index.html
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>Simple Beam</title>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"></script>
<style type="text/css">
body {
font: 13px sans-serif;
}
You can’t perform that action at this time.