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> |
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
{ | |
"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
(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
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
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 express = require('express'), | |
app = express(); | |
var Gun = require('gun'); | |
var gun = Gun({ | |
file: 'data.json' | |
}); | |
gun.wsp(app); | |
app.use(express.static(__dirname)).listen(9000); |
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
/** | |
* Main.js | |
*/ | |
'use strict'; | |
import React from 'react' | |
import { render } from 'react-dom' | |
const gun = Gun(location.origin +'/gun'); | |
const GUN_PATH = 'repo_42'; |
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
/* | |
* JavaScript Pretty Date | |
* Copyright (c) 2011 John Resig (ejohn.org) | |
* Licensed under the MIT and GPL licenses. | |
* prettyDate("2008-01-28T20:24:17Z") // => "2 hours ago" | |
* prettyDate("2008-01-27T22:24:17Z") // => "Yesterday" | |
* prettyDate("2008-01-26T22:24:17Z") // => "2 days ago" | |
* prettyDate("2008-01-14T22:24:17Z") // => "2 weeks ago" | |
* prettyDate("2007-12-15T22:24:17Z") // => undefined |
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
/** | |
* index.js | |
*/ | |
"use strict"; | |
// Require app specific CSS | |
require('./app.css'); | |
import React from 'react'; | |
import ReactDOM from 'react-dom'; |
OlderNewer