This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Html exposing (..) | |
import Html.Attributes exposing (..) | |
import Html.App as Html | |
import Html.Events exposing (..) | |
import Http | |
import Json.Decode as Json exposing ((:=)) | |
import Json.Encode exposing (encode) | |
import Task | |
import Date exposing (Date) | |
import String |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var hashChangeEvent = Rx.Observable.fromEvent(window, 'hashchange'); | |
var hash = location.hash; | |
var hashSubject = new Rx.BehaviorSubject(hash); | |
hashSubject.subscribe(function(hash) { | |
router(hash.replace('#', '')); | |
}); | |
hashChangeEvent.subscribe(function(e) { | |
hashSubject.onNext(location.hash); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
var cache = {}; | |
this.tmpl = function tmpl(str, data){ | |
// Figure out if we’re getting a template, or if we need to | |
// load the template – and be sure to cache the result. | |
var fn = !/\W/.test(str) ? | |
cache[str] = cache[str] || | |
tmpl(document.getElementById(str).innerHTML) : |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "reactworkbench", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1", | |
"start": "cd public && serve" | |
}, | |
"author": "", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Package.json | |
*/ | |
{ | |
"name": "gunner", | |
"version": "1.0.0", | |
"description": "", | |
"main": "http.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Dates man</title> | |
</head> | |
<body> | |
<div id="chart"></div> | |
<script data-main="main.js" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.22/require.min.js"></script> | |
</body> |
NewerOlder