Skip to content

Instantly share code, notes, and snippets.

@ishiduca
ishiduca / done.js
Created July 9, 2017 09:41
チェーン・コマンドパース
var inherits = require('inherits')
var Parser = require('../parser').Parser
module.exports = DoneParser
inherits(DoneParser, Parser)
function DoneParser () {
Parser.call(this)
}
@ishiduca
ishiduca / index.html
Last active June 30, 2017 10:54
is this "Data Down Actions Up" pattern ?
<!doctype html><body><script src="/bundle.js"></script></body>
@ishiduca
ishiduca / browser.js
Created June 16, 2017 11:28
router-on-websocket-stream with reconnect-core
'use strict'
var w = require('global/window')
var d = require('global/document')
var yo = require('yo-yo')
// var xtend = require('xtend')
// var missi = require('mississippi')
var inject = require('reconnect-core')
var websocket = require('websocket-stream')
var router = require('router-on-websocket-stream')
var loc = w.location
@ishiduca
ishiduca / main.js
Created June 7, 2017 09:49
countdown timer
var d = require('global/document')
var yo = require('yo-yo')
var ready = require('document-ready')
var css = require('sheetify')
var prefix = css `
:host {
display: flex;
justify-context: center;
}
@ishiduca
ishiduca / app.js
Last active May 23, 2017 06:10
example of buoyancy with websocket
'use strict'
var path = require('path')
var http = require('http')
var ecstatic = require('ecstatic')(path.join(__dirname, 'static'))
var websocket = require('websocket-stream')
var miss = require('mississippi')
var port = 3003
var app = http.createServer(ecstatic)
websocket.createServer({server: app}, s => {
@ishiduca
ishiduca / bin_trombone.js
Last active May 21, 2017 09:24
trombone-download
#!/usr/bin/env node
'use strict'
var url = require('url')
var path = require('path')
var miss = require('mississippi')
var mkdirp = require('mkdirp')
var notifier = require('node-notifier')
var config = require('./config')
var trombone = require('../trombone')
@ishiduca
ishiduca / index.html
Last active March 2, 2017 01:26
yo-yo と csjs
<!doctype html><body><script src="./bundle.js"></script></body>
@ishiduca
ishiduca / app.js
Created January 17, 2017 00:26
yo-yo with send-action
var d = require('global/document')
var onload = require('on-load')
var yo = require('yo-yo')
var sendAction = require('send-action')
var root = d.createElement('main')
var send = sendAction({
onAction (state, action, data) {
console.log('onAction')
console.log(state)
const xtend = require('xtend')
const d = require('global/document')
const onload = require('on-load')
const sheetRouter = require('sheet-router')
const href = require('sheet-router/href')
const spinit = require('./spinit')
const yo = spinit.html
const root = d.createElement('main')
@ishiduca
ishiduca / lets-sheet-router.js
Last active January 14, 2017 01:40
example of sheet-router with yo-yo
const sheetRouter = require('sheet-router')
const href = require('sheet-router/href')
const html = require('yo-yo')
const d = require('global/document')
const mainView = params => html `
<div style="display:flex;flex-direction:row">
<div><a href="/Twiggy/orgs">gotcha Twiggy !</a></div>
<div><a href="/ishiduca" data-no-routing>gotcha ishiduca !</a></div>
</div>