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 / App.elm
Last active Jul 4, 2019
Demo on how to split code across multiple pages.
View App.elm
module Main exposing (..)
import Html exposing (Html, div, hr, text)
import Html.App as App
import Navigation
-- APP IMPORTS
import FirstPage
View Mario.elm
import Html exposing (..)
import Keyboard
import Window exposing (Size)
import AnimationFrame
import Task
import Html.App as App
import Collage exposing (..)
import Element exposing (..)
@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 =
View RandomDemo.elm
module RandomDemo where
import Html exposing (..)
import Html.Events exposing (onClick)
import Random exposing (int, generate)
import StartApp
import Effects exposing (Effects)
@pdamoc
pdamoc / Basic.elm
Created Jun 20, 2017
Styles isolation
View Basic.elm
module Main exposing (..)
import Element exposing (..)
import Element.Attributes exposing (..)
import BasicStyles exposing (..)
{-| A synonym for creating tuples. This will be included in the standard library soon.
1 => 2 == (1, 2)
@pdamoc
pdamoc / Child.elm
Created Jun 3, 2016
Child 2 Child Communication.
View Child.elm
module Child exposing (..)
import Html exposing (..)
import Html.Attributes exposing (value)
import Html.Events exposing (on, onClick, targetValue)
import Json.Decode as Json
-- MODEL
@pdamoc
pdamoc / Main.elm
Created May 31, 2016
Req msg with cache
View Main.elm
module Main exposing (..)
import Html exposing (..)
import Html.App as App
import Html.Events exposing (onClick)
import Req exposing (..)
import Dict exposing (Dict)
main : Program Never
@pdamoc
pdamoc / Pong.elm
Last active Oct 16, 2016
Pong Example
View Pong.elm
-- See this document for more information on making Pong:
-- http://elm-lang.org/blog/pong
import Color exposing (..)
import Collage exposing (..)
import Element exposing (..)
import Keyboard
import Text
import Time exposing (..)
import Window exposing (Size)
import Html.App as App
@pdamoc
pdamoc / Counter.elm
Last active Oct 10, 2016
Multi component elm
View Counter.elm
port module Counter exposing (..)
import Html exposing (..)
import Html.App exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (..)
import Json.Decode as Json exposing (Value)
type alias Model =
@pdamoc
pdamoc / CounterList.elm
Created Aug 30, 2016
CounterList Example without nesting.
View CounterList.elm
module Main exposing (..)
import Html exposing (..)
import Html.App as App
import Html.Attributes exposing (..)
import Html.Events exposing (..)
main =
App.beginnerProgram
You can’t perform that action at this time.