Skip to content

Instantly share code, notes, and snippets.

View joyrexus's full-sized avatar

J. Voigt joyrexus

View GitHub Profile
@joyrexus
joyrexus / base.coffee
Last active December 25, 2015 00:28 — forked from ryanflorence/Base.coffee
CoffeeScript base class
class Base
###
Provides default options, mixins, and custom events.
###
defaults: {}
constructor: (options) ->
@setOptions options
@joyrexus
joyrexus / index.html
Last active December 23, 2015 20:09 — forked from tmcw/index.html
Unit Trig Circle
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
font: 10px sans-serif;
margin: 0;
padding: 0;
}
@joyrexus
joyrexus / index.html
Last active December 22, 2015 22:59 — forked from tmcw/index.html
Mapping migratory bird species
<!DOCTYPE html>
<meta charset=utf-8 />
<script src='http://api.tiles.mapbox.com/mapbox.js/v1.3.1/mapbox.js'></script>
<link href='http://api.tiles.mapbox.com/mapbox.js/v1.3.1/mapbox.css' rel='stylesheet' />
<style>
body { margin:0; padding:0; }
#map { position:relative; width:960px;height:500px; }
</style>
<body>
<div id='map'></div>
@joyrexus
joyrexus / README.md
Last active December 21, 2015 10:49 — forked from mbostock/.block
UP/Munising zoom.
@joyrexus
joyrexus / state-monad.coffee
Created May 28, 2013 15:46 — forked from igstan/state-monad.coffee
State monad in CoffeeScript
push = (element) -> (stack) ->
newStack = [element].concat stack
{value: element, stack: newStack}
pop = (stack) ->
element = stack[0]
newStack = stack.slice 1
{value: element, stack: newStack}
bind = (stackOperation, continuation) -> (stack) ->
@joyrexus
joyrexus / state-monad.scm
Created May 28, 2013 15:45 — forked from igstan/state-monad.scm
State monad in scheme.
(define (push element)
(lambda (stack)
(list '() (cons element stack))))
(define (pop)
(lambda (stack)
(let ((element (car stack))
(new-stack (cdr stack)))
(list element new-stack))))