Skip to content

Instantly share code, notes, and snippets.

@pdamoc
pdamoc / Print2.elm
Created July 18, 2016 11:06
Svg Error
module Print2 exposing (..)
import Html exposing (div, button, text, body, iframe)
import Html.Attributes as A
import Html.App as App
import Html.Events exposing (onClick)
import Svg exposing (..)
import Svg.Attributes exposing (..)
import VirtualDom exposing (..)
import String
@pdamoc
pdamoc / Component.elm
Last active June 27, 2016 08:09
Counter through JS
module Component exposing (..)
import Html exposing (..)
import Html.Attributes exposing (style)
import Html.Events exposing (onClick)
import Ports exposing (..)
-- MODEL
@pdamoc
pdamoc / Sam.elm
Created June 21, 2016 09:15
update to valid data
import Html exposing (..)
import Html.App as App
import Html.Events exposing (on, onClick)
import Html.Attributes exposing (style)
import Mouse exposing (Position)
import Json.Decode as Json
-- MODEL
@pdamoc
pdamoc / Sam.elm
Created June 21, 2016 08:01
Another SAM approach
import Html exposing (..)
import Html.App as App
import Html.Events exposing (on, onClick)
import Html.Attributes exposing (style)
import Mouse exposing (Position)
import Json.Decode as Json
-- MODEL
@pdamoc
pdamoc / Main2.elm
Created June 17, 2016 15:26
SAM with AnimationFrame
module Main exposing (..)
import Html exposing (..)
import Html.App as App
import Html.Events exposing (onClick)
import AnimationFrame
import Time exposing (Time, second)
-- MODEL
@pdamoc
pdamoc / Main.elm
Last active June 17, 2016 15:11
SAM in Elm
module Main exposing (..)
import Html exposing (..)
import Html.App as App
import Html.Events exposing (onClick)
import Time
-- MODEL
@pdamoc
pdamoc / RandomGif.elm
Last active May 24, 2016 06:32
Chain Html.App.map Error - Start from WidgetList.elm
module RandomGif exposing (..)
import Html exposing (..)
import Html.Attributes exposing (style)
import Html.Events exposing (onClick)
import Http
import Json.Decode as Json
import Task
@pdamoc
pdamoc / Component.elm
Created May 20, 2016 20:48
Counters through JS
module Component exposing (..)
import Html exposing (..)
import Html.Attributes exposing (style)
import Html.Events exposing (onClick)
import Ports exposing (..)
-- MODEL
@pdamoc
pdamoc / RelativeMouse.elm
Created May 20, 2016 07:33
Relative Mouse Position
import Html exposing (..)
import Html.App as App
import Html.Attributes exposing (..)
import Mouse exposing (Position)
import Window exposing (Size)
import Task
-- MODEL
plottingSize = Size 600 400
@pdamoc
pdamoc / Counter.elm
Last active May 19, 2016 20:37
Widget Union
module Counter exposing (..)
import Html exposing (..)
import Html.Attributes exposing (style)
import Html.Events exposing (onClick)
-- MODEL
type alias Model = Int