Skip to content

Instantly share code, notes, and snippets.

View TheSeamau5's full-sized avatar

Hassan Hayat TheSeamau5

  • Entrepreneur
  • Austin, TX
View GitHub Profile
@TheSeamau5
TheSeamau5 / labelAsData.elm
Created June 9, 2015 20:55
Label as Data
import Html exposing (Html)
import Html.Attributes exposing (style)
import Color exposing (Color)
import Mouse
(=>) = (,)
toRgbaString color =
let {red, green, blue, alpha} = Color.toRgb color
in
import Html exposing (Html)
import Html.Attributes exposing (style)
import Color exposing (Color)
(=>) = (,)
toRgbaString color =
let {red, green, blue, alpha} = Color.toRgb color
in
@TheSeamau5
TheSeamau5 / swipepageselm.elm
Last active September 20, 2016 08:10
Swipeable Pages in Elm
import Html exposing (Html)
import Html.Attributes
import Html.Events
import Mouse
import Signal exposing (Signal, Address)
import StartApp
import Json.Decode exposing ((:=))
import List
@TheSeamau5
TheSeamau5 / elm-animation-alt.elm
Created June 14, 2015 22:06
Example of Alternative to elm-animation
import Html exposing (Html, Attribute)
import Html.Attributes
import Html.Events
import Signal exposing (Address)
import Json.Decode exposing (Decoder, (:=))
import Time
import List
@TheSeamau5
TheSeamau5 / Button.elm
Created June 14, 2015 23:40 — forked from jinjor/Button.elm
Version using Elm Architecture
import Html exposing (Html)
import Html.Events
import Signal exposing (Address, Signal)
-- Button Component --
type ButtonAction
= Click
| NoOpButton
@TheSeamau5
TheSeamau5 / littlejsonencoder.elm
Created June 22, 2015 20:37
Little JSON encoder
import String
import List
infixl 2 =>
(=>) = (,)
type Json
= Number Float
| String String
@TheSeamau5
TheSeamau5 / draggabledivs.elm
Created June 29, 2015 17:30
Draggable divs
import Html exposing (Html, Attribute)
import Html.Attributes
import Html.Events
import Signal exposing (Address, Message)
import List
import Json.Decode exposing (Decoder, (:=))
-------------------
--- HELPER CODE ---
-------------------
nth : Int -> List a -> Maybe a
import Html exposing (Html)
import Html.Attributes
import Html.Events
import Signal exposing (Address)
import List
import Window
-----------------
-- HELPER CODE --
import Html exposing (Html)
import Html.Attributes
import Signal exposing (Address)
import List
infixl 2 =>
(=>) = (,)
type alias Vector =
{ x : Float , y : Float }
import Html exposing (Html)
import Html.Attributes
import Html.Events
import Signal exposing (Address)
import Json.Decode exposing (Decoder, (:=))
import List
-------