Skip to content

Instantly share code, notes, and snippets.

Petre Damoc pdamoc

Block or report user

Report or block pdamoc

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@pdamoc
pdamoc / Main.elm
Created May 31, 2016
Req msg instead of Cmd msg
View Main.elm
module Main exposing (..)
import Html exposing (..)
import Html.App as App
import Html.Events exposing (onClick)
import Req exposing (..)
main : Program Never
main =
@pdamoc
pdamoc / Main.elm
Last active Jun 17, 2016
SAM in Elm
View Main.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
Chain Html.App.map Error - Start from WidgetList.elm
View RandomGif.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
Counters through JS
View Component.elm
module Component exposing (..)
import Html exposing (..)
import Html.Attributes exposing (style)
import Html.Events exposing (onClick)
import Ports exposing (..)
-- MODEL
@pdamoc
pdamoc / Component.elm
Last active Jun 27, 2016
Counter through JS
View Component.elm
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
Relative Mouse Position
View RelativeMouse.elm
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
Widget Union
View Counter.elm
module Counter exposing (..)
import Html exposing (..)
import Html.Attributes exposing (style)
import Html.Events exposing (onClick)
-- MODEL
type alias Model = Int
@pdamoc
pdamoc / Flexy.elm
Created May 16, 2016
Flex layout helper
View Flexy.elm
module Flexy
( Design, design
, row, column, rowReverse, columnReverse
, wrap, wrapReverse, noWrap
, justifyStart, justifyCenter, justifyEnd, justifyBetween, justifyAround
, alignItemsStart, alignItemsCenter, alignItemsEnd
, alignItemsStretch, alignItemsBaseline
, alignContentStart, alignContentCenter, alignContentEnd, alignContentStretch
, alignContentBetween, alignContentAround
, flex, order
@pdamoc
pdamoc / CounterSync2.elm
Created May 14, 2016
Counter Sync Version 2
View CounterSync2.elm
import Html exposing (Html, div, button, text)
import Html.App as App exposing (beginnerProgram)
import Html.Events exposing (onClick)
import Html.Attributes exposing (style)
main : Program Never
main =
beginnerProgram { model = init 0 0 0, view = view, update = update }
-- MODEL
@pdamoc
pdamoc / CounterSync.elm
Created May 14, 2016
CounterPair in Sync
View CounterSync.elm
import Html exposing (Html, div, button, text)
import Html.App as App exposing (beginnerProgram)
import Html.Events exposing (onClick)
import Html.Attributes exposing (style)
main : Program Never
main =
beginnerProgram { model = init (0,0) (0,0), view = view, update = update }
-- MODEL
You can’t perform that action at this time.