Skip to content

Instantly share code, notes, and snippets.

@terrierscript
terrierscript / file0.txt
Last active December 20, 2017 11:25
WASM (on AssemblyScript) をChromeとnodeそれぞれで動かすまで ref: https://qiita.com/inuscript/items/4201f0ccd192bde998c5
$ npx create-react-app wasm-sample
@terrierscript
terrierscript / config.yml
Created November 3, 2017 10:07
Circle-CI 2.0のcron triggerを使って、定期実行をする ref: http://qiita.com/inuscript/items/55b6bbfbc064e80c1349
version: 2
jobs:
test: # 普通のテスト
docker:
- image: node:8
steps:
- checkout
- run: npm run test
heavy_test: # 重いテスト
docker:
require("rxjs")
const Rx = require("rxjs")
const { ActionsObservable } = require("redux-observable")
const playgroundEpic = action$ =>
action$.ofType("FIRST")
.map( (a) =>( { type: "THIRD" } ) )
const action$ = ActionsObservable.of({ type: 'FIRST' }, { type: 'SECOND' })
@terrierscript
terrierscript / esnextbin.md
Created January 3, 2017 15:55
esnextbin sketch
@terrierscript
terrierscript / esnextbin.md
Created January 3, 2017 15:34
esnextbin sketch
@terrierscript
terrierscript / index.js
Last active November 30, 2016 00:54
babel-polyfillのArrayの処理まわりがやっていること
// 元のこんなコードを読み解く
//
// let DEFINE_PROPERTY = "defineProperty";
// function define(O, key, value) {
// O[key] || Object[DEFINE_PROPERTY](O, key, {
// writable: true,
// configurable: true,
// value: value
// });
// }
@terrierscript
terrierscript / index.js
Created October 7, 2016 00:43
react-router@v4 Wizard
import React, { Component, PropTypes } from 'react'
import Router from 'react-router/BrowserRouter'
import { Match, Link, Redirect } from 'react-router'
const First = () => <div>First</div>
const Second = () => <div>Second</div>
const Third = () => <div>Third</div>
const wizardLink = (pathname) => {
switch(pathname){
@terrierscript
terrierscript / esnextbin.md
Created August 30, 2016 13:51
esnextbin sketch
@terrierscript
terrierscript / esnextbin.md
Created August 25, 2016 14:43
esnextbin sketch
@terrierscript
terrierscript / file0.txt
Last active July 8, 2016 12:50
Rails5からはもうdefault_value_forは必要ないのかもしれない ref: http://qiita.com/inuscript/items/e98caa8469ed7143404a
class SomeModel < ActiveRecord::Base
default_value_for :is_public, false
end