Skip to content

Instantly share code, notes, and snippets.

Stephen Bannasch stepheneb

Block or report user

Report or block stepheneb

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@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
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 / 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;
}
@stepheneb
stepheneb / index.html
Last active Jan 14, 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>Two Graphs</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 / README.md
Last active Jan 14, 2020
Simple 2D molecular simulation written in JavaScript
View README.md

Simple Molecules

See this example live

About the Simple Molecules Model

You can select how many molecules to use and what the temperature should be.

About the Lennard-Jones potential graph

@stepheneb
stepheneb / README.md
Last active Jan 8, 2020
JavaScript mixin patterns
View README.md

JavaScript mixin patterns

Four different ways JavaScript variables and closures can be used to implement different mix-in patterns.

Each implementation creates a mixin that creates property getter functions for model objects.

By model object I mean a function that takes properties (keys and values)( and returns an object that:

You can’t perform that action at this time.