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
| { | |
| "$schema": "http://json-schema.org/draft-04/schema#", | |
| "description": "A representation of a person, company, organization, or place", | |
| "type": "object", | |
| "required": ["familyName", "givenName"], | |
| "properties": { | |
| "fn": { | |
| "description": "Formatted Name", | |
| "type": "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
| module JsxParser | |
| exposing | |
| ( JSXElement | |
| , JSXAttribute | |
| , JSXAttributeValue(..) | |
| , JSXChild(..) | |
| , run | |
| ) | |
| {- JSX Parser |
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 Html exposing (..) | |
| import Html.Attributes exposing (..) | |
| import Html.Events exposing (..) | |
| import Random exposing (..) | |
| main = | |
| program | |
| { init = init | |
| , update = update |
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 Html exposing (text) | |
| main = | |
| text (toString <| allTheSame equal [ obj1, obj2, obj3 ]) | |
| obj1 = { id = 1, name = "foo" } | |
| obj2 = { id = 1, name = "bar" } | |
| obj3 = { id = 1, name = "baz" } |
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
| interface BeginnerProgram<Model, Msg> { | |
| Model model(); | |
| Model update(Msg msg, Model model); | |
| Html<Msg> view(Model model); | |
| } |
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
| // https://gist.github.com/kawanet/5553478 | |
| function normalizeKana(src) { | |
| return src.replace(/[\u30a1-\u30f6]/g, function(match) { | |
| var chr = match.charCodeAt(0) - 0x60; | |
| return String.fromCharCode(chr); | |
| }); | |
| } | |
| // http://www13.plala.or.jp/bigdata/kanji_2.html | |
| function normalizeKanji(src) { |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF8"> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/marked/0.3.6/marked.min.js"></script> | |
| <link href="https://fonts.googleapis.com/earlyaccess/roundedmplus1c.css" rel="stylesheet" /> | |
| <style> | |
| html { background-color: #eee; } | |
| body { background-color: #fff; margin: 0; padding: 20px 40px; font-family: "Rounded Mplus 1c"; max-width: 500px; margin-left: auto; margin-right: auto; } | |
| h2 { border-bottom: solid 1px; margin-top: 2em; } |
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
| module Colors exposing (..) | |
| {- | |
| https://material.io/guidelines/style/color.html | |
| $$('.color-group').filter((_,i) => i < 19).map(g => $('.main-color .name',g).textContent.toLowerCase()).join('\n') | |
| $$('.color-group').filter((_,i) => i < 19).map(g => $('.main-color .name',g).textContent.toLowerCase() + ' =\n [ ' + $$('li.color', g).filter((c, i) => i >= 1 && i <= 10).map(c => '(' + c.textContent.split('#')[0] + ', "#'+c.textContent.split('#')[1] + '")').join('\n , ') + '\n ]').join('\n\n') | |
| -} | |
| depth : Int -> List 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
| headOrDead : List a -> a | |
| headOrDead list = | |
| case list of | |
| [] -> | |
| Debug.crash "oh?" | |
| x :: _ -> | |
| x |
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
| port module Konami exposing (..) | |
| import Char | |
| import Keyboard exposing (KeyCode) | |
| main = | |
| Platform.program | |
| { init = init |