Skip to content

Instantly share code, notes, and snippets.

@giisyu
giisyu / file0.txt
Last active October 21, 2016 14:11
Elmでマテリアルデザイン ref: http://qiita.com/jooex/items/c4f9b6dcc8014803456e
elm-package install debois/elm-mdl -y
npm install -g swagger
@giisyu
giisyu / mtgsite.md
Last active October 22, 2016 16:17
// pull in desired CSS/SASS files
require("./styles/main.scss");
// inject bundled Elm app into div#main
const Elm = require("../elm/Main")
// require jquery
const $ = require("jquery");
const app = Elm.Main.embed(document.getElementById("main"));
@giisyu
giisyu / file0.txt
Last active November 15, 2016 02:37
Elm内にtwitterボタン等scriptタグがあるものを貼る ref: http://qiita.com/jooex/items/6757a1cf9a57fddb3829
import Html exposing (..)
import Html.Attributes exposing (..)
script_ : List (Attribute msg) -> List (Html msg) -> Html msg
script_ =
Html.node "script"
git clone [email protected]:giisyu/elm-webpack-starter.git %1 && ^
cd %1 && ^
del /q /s /f .git && ^
git init && ^
git add . && ^
git commit -m "first" && ^
npm install && ^
elm-package install -y && ^
npm start
port hello : String -> Cmd msg
port jsHello : (String -> msg) -> Sub msg
@giisyu
giisyu / file0.js
Last active December 26, 2016 23:27
The Elm Architecture(0.18)effect moduleメモ ref: http://qiita.com/jooex/items/9cca8e4ec900b52ef30c
function spawnLoop(init, onMessage)
{
var andThen = _elm_lang$core$Native_Scheduler.andThen;
function loop(state)
{
var handleMsg = _elm_lang$core$Native_Scheduler.receive(function(msg) {
return onMessage(msg, state);
});
return A2(andThen, loop, handleMsg);