Skip to content

Instantly share code, notes, and snippets.

View pyar6329's full-sized avatar

Tsukasa Arima pyar6329

View GitHub Profile
PostgreSQL Type PostgreSQL Size Description Range Diesel Type Rust Type
Nullable Types nullable Nullable``
@pyar6329
pyar6329 / password.elm
Created June 15, 2018 05:35 — forked from moonlightdrive/password.elm
Password Validation Exercises from the Elm Architecture Tutorial
{- Implementation of the Exercises for the Forms section of the Elm Architecture Tut
- http://guide.elm-lang.org/architecture/user_input/forms.html
-
- Elm Platform 0.17.1
-}
import Html exposing (..)
import Html.App as Html
import Html.Attributes exposing (..)
import Html.Events exposing (onInput, onClick)
@pyar6329
pyar6329 / main.elm
Created May 2, 2018 09:07 — forked from maticzav/main.elm
Flatten 2D list in Elm
import List exposing (..)
flatten2D : List (List a) -> List a
flatten2D list =
foldr (++) [] list
-- SAMPLE
flatten2D [[1,2],[3,4],[1,1]] == [1,2,3,4,1,1]
@pyar6329
pyar6329 / destructuring.md
Created May 2, 2018 09:06 — forked from yang-wei/destructuring.md
Elm Destructuring (or Pattern Matching) cheatsheet

Should be work with 0.18

Destructuring(or pattern matching) is a way used to extract data from a data structure(tuple, list, record) that mirros the construction. Compare to other languages, Elm support much less destructuring but let's see what it got !

Tuple

myTuple = ("A", "B", "C")
myNestedTuple = ("A", "B", "C", ("X", "Y", "Z"))
@pyar6329
pyar6329 / 0_reuse_code.js
Created October 11, 2016 08:45
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@pyar6329
pyar6329 / devise.ja.yml
Last active August 29, 2015 14:27 — forked from satour/devise.ja.yml
Japanese locale file for Devise (3.4.0)
# Additional translations at https://github.com/plataformatec/devise/wiki/I18n
ja:
devise:
confirmations:
confirmed: 'アカウントを登録しました。'
send_instructions: 'アカウントの有効化について数分以内にメールでご連絡します。'
send_paranoid_instructions: "あなたのメールアドレスが登録済みの場合、本人確認用のメールが数分以内に送信されます。"
failure:
already_authenticated: 'すでにログインしています。'