- data: string; // markdown
- date: string; // yyyy-mm-dd
- html: string; // html compiled markdown
- minutes: number; // min.
- pubdate: string; // iso8601 "yyyy-mm-ddThh:mm:ss+09:00"
- tags: string[];
- title: 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
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Launch", | |
"type": "node", | |
"request": "launch", | |
"program": "${workspaceRoot}/.tmp/src/server/index.js", | |
"stopOnEntry": false, | |
"args": [], |
insert mode:
- (escape 以外のすべてのキー) ... 入力される
normal mode:
- ia ... insert mode を行頭で開始
- ie ... insert mode を行末で開始
- ih ... insert mode を左で開始 カーソル位置 (カーソル左ではない)
- ij ... insert mode を下で開始 次の行 (行を追加)
- ik ... insert mode を上で開始 前の行 (行を追加)
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
// handler boilerplate | |
import { O, A, Handler } from 'boa-core'; | |
const tActionTypeDefault = 'action1'; | |
const uActionTypeDefault = 'action2'; | |
type X = number; | |
type T = { name: string; params: X; }; // A<T> input | |
type U = string; // A<U> output |
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
IDDD: Implementing Domain-Driven Design | |
実践ドメイン駆動設計-Object-Oriented-SELECTION- | |
ヴァーン・ヴァーノン | |
http://www.amazon.co.jp/dp/479813161X | |
Implementing Domain-Driven Design 1st Edition | |
Vaughn Vernon | |
http://www.amazon.com/dp/0321834577 |
b-o-a の構造を説明します。
b-o-a の構造は、循環する Observer Pattern です。Subject -> App -> Subject ... で循環します。通知されるデータの形式は A: Action です。A は 処理の type と data をまとめたものです。
b-o-a のアプリケーションはただひとつの関数 App からなります。
type App = (action$: O<A>) => O<A>;
O は Observable 、A は Action です。
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
// 1. Aciton の data を受けて次の Action type & data を返す関数群 | |
// 2. 1 個の Action を N 個の ActionHandler で処理したい | |
// X 3. N 個の Action に共通の ActionHandler を追加したい | |
// -> merge, chain がほしい。dummy の Action を追加するのは辛い | |
// framework | |
import { EventEmitter } from 'events'; | |
type NextAction = (action: Action) => void; | |
type ActionHandler = (data: any, re: NextAction) => Action; |
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'); | |
var pathToRegexp = require('path-to-regexp'); | |
var entriesIndex = function() { | |
return 'entry list html'; | |
}; | |
var entriesShow = function(params) { | |
return 'entry item html : ' + params[0]; | |
}; |
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 assert from 'power-assert'; | |
import { Observable } from 'rxjs'; | |
import pairwise from '../src/pairwise'; | |
describe('pairwise', function() { | |
context('when []', function() { | |
it('works', function() { | |
const source = Observable.fromArray([]); | |
pairwise(source) | |
.toArray() |