Skip to content

Instantly share code, notes, and snippets.

@kkismd
kkismd / DbItem.scala
Last active August 29, 2015 14:19 — forked from gakuzzzz/enum.scala
type Database = Map[String, Any]
case class Item[+A](name: String) {
def get(d: Database) = d(name).asInstanceOf[A]
}
implicit class DB(val d: Database) extends AnyVal {
def get[A](n: Item[A]): A = n.get(d)
}
#!/usr/bin/env sh
mkdir $1
cd $1
npm init -y
npm install -D babelify watchify babel-preset-es2015 babel-preset-react babel-plugin-syntax-flow babel-plugin-transform-flow-strip-types react react-dom
echo '{"presets": ["es2015", "react"], "plugins": ["transform-flow-strip-types", "syntax-flow"]}' > .babelrc
gibo Node OSX > .gitignore
cat <<EOF > .flowconfig
[ignore]
@kkismd
kkismd / gist:30bbb5d2aca05194f91097c7c251f2c6
Created October 18, 2016 07:15 — forked from kennyj/gist:4966002
ハイフン付き電話番号に分割
# encoding: utf-8
module TelSplitter
MAP = {
# 市外局番 , 市内局番の桁数のマップ
# http://www.soumu.go.jp/main_sosiki/joho_tsusin/top/tel_number/number_shitei.html のデータを利用
# 固定電話以外の桁数は適当です...
'050' => 4, # IP電話
'070' => 4, # 携帯電話/PHS
'080' => 4, # 携帯電話
@kkismd
kkismd / google-ime_azik.tsv
Created November 20, 2017 01:43 — forked from junkw/google-ime_azik.tsv
Google 日本語入力用 AZIK ローマ字テーブル (for macOS + US キーボード)
-
~
:
;
a
ba
bd べん
be
bh ぶう
bi