Skip to content

Instantly share code, notes, and snippets.

@cwleonard
cwleonard / jspolygon.js
Created August 30, 2014 13:25
Convex Polygon Intersection
/*
* This is the Point constructor. Polygon uses this object, but it is
* just a really simple set of x and y coordinates.
*/
function Point(px, py) {
this.x = px;
this.y = py;
}
/*
@benjchristensen
benjchristensen / index.html
Created May 2, 2012 19:34
Simple Line Graph using SVG and d3.js
<html>
<head>
<title>Simple Line Graph using SVG and d3.js</title>
<script src="http://mbostock.github.com/d3/d3.v2.js"></script>
<style>
/* tell the SVG path to be a thin blue line without any area fill */
path {
stroke: steelblue;
stroke-width: 1;
fill: none;
@nephics
nephics / client.py
Created August 9, 2011 19:33
Test of experimental Tornado feature for a streaming request body handler
#
# Test of experimental Tornado feature for a streaming request body handler, see
# https://github.com/nephics/tornado/commit/1bd964488926aac9ef6b52170d5bec76b36df8a6
#
#
# Client sending file to server
#
import tornado.httpclient as httpclient