Skip to content

Instantly share code, notes, and snippets.

View notmatt's full-sized avatar
⚛️
Friend of electrons

Matthew Smillie notmatt

⚛️
Friend of electrons
View GitHub Profile
@notmatt
notmatt / hello_node.md
Created May 27, 2012 19:47
Polyglotconf ad-hoc "intro to node.js" talk

Polyglotconf intro to node.js

If you're interested in learning more in person, VanJS (@vanjs) often has node-related content.

And like Rob and Brock mentioned in the session, they're starting up the Vancouver Node Brigade (@NodeBrigade) for a more node-focused meetup.

Now, as promised, links from the session and some expanded notes. All questions, comments, and pull requests are most welcome.

Installation & Hello World

@notmatt
notmatt / bd_groups.js
Created April 8, 2012 06:38 — forked from mbecica/bd_groups.js
pack to force-directed transition
$(function() {
var w = $('#container').width()/2,
h = w,
format = d3.format(",d"),
fill = d3.scale.category20b(),
padding = 2,
radius = d3.scale.sqrt().range([0, 12]);
var vis = d3.select("#main").append("svg:svg")
@notmatt
notmatt / index.html
Created April 2, 2012 17:25 — forked from scameron/index.html
Axis scale tick distribution example
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>bar</title>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"></script>
<style type="text/css">
div {
border: 1px solid #BBB;
padding: 0px;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Scratch</title>
<link href="http://notmatt.github.com/scratch/bootstrap/css/bootstrap.css" rel="stylesheet">
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js?2.7.0"></script>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.geom.js?2.7.0"></script>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.layout.js?2.7.0"></script>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.chart.js?2.7.0"></script>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Scratch</title>
<link href="../assets/css/bootstrap.css" rel="stylesheet">
<link href="../assets/css/bootstrap-responsive.css" rel="stylesheet">
</head>
@notmatt
notmatt / gist:1613012
Created January 14, 2012 21:46 — forked from trshafer/gist:519251
git ps1
# GIT PS1
# COLORS
LIGHT_GRAY="\[\033[0;37m\]"; BLUE="\[\033[0;34m\]"; RED="\[\033[0;31m\]"; LIGHT_RED="\[\033[1;31m\]";
GREEN="\[\033[0;32m\]"; WHITE="\[\033[1;37m\]"; LIGHT_GRAY="\[\033[0;37m\]"; YELLOW="\[\033[1;33m\]";
BROWN="\[\033[0;33m\]"; BLACK="\[\033[0;30m\]";PURPLE="\[\033[0;35m\]";CYAN="\[\033[0;36m\]";
# GIT PROMPT (http://gist.github.com/120804)
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ \(\1\)/';
}
function parse_git_status {
@notmatt
notmatt / index.html
Created January 3, 2012 22:34 — forked from jasondavies/index.html
alpha-shapes aka concave hulls in d3
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>Alpha-Shapes</title>
<script src="http://mbostock.github.com/d3/d3.min.js"></script>
<script src="http://mbostock.github.com/d3/d3.geom.min.js"></script>
<style type="text/css">
path {
@notmatt
notmatt / index.html
Created July 18, 2011 21:21
another d3 leak test
<html>
<head><title>Test</title>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js?1.26.0"></script>
</head>
<body>
<div class="content"></div>
<script>
var t = 1297110663,
v = 70,
data = d3.range(33).map(next);
@notmatt
notmatt / index.html
Created July 14, 2011 23:40
d3 bar graph leak test.
<html>
<head><title>Test</title>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js?1.26.0"></script>
</head>
<body>
<div class="content"></div>
<script>
var t = 1297110663,
v = 70,
data = d3.range(33).map(next);