Skip to content

Instantly share code, notes, and snippets.

View onetwothreebutter's full-sized avatar

Eric Johnson onetwothreebutter

View GitHub Profile
@jesstelford
jesstelford / event-loop.md
Last active June 7, 2024 17:12
What is the JS Event Loop and Call Stack?

Regular Event Loop

This shows the execution order given JavaScript's Call Stack, Event Loop, and any asynchronous APIs provided in the JS execution environment (in this example; Web APIs in a Browser environment)


Given the code

@fredguth
fredguth / tutorial.elm
Last active February 7, 2016 21:35
Part 2: Following Elm tutorial
import Graphics.Element exposing (..)
import Graphics.Collage exposing (..)
import Color exposing (..)
import Mouse
import Window
import Time exposing (..)
import Signal exposing (foldp)
--Model
import Graphics.Element exposing (..)
import Graphics.Collage exposing (..)
import Color exposing (..)
import Mouse
import Window
relativeMouse : (Int, Int) -> (Int, Int) -> (Int, Int)
relativeMouse (origin_x, origin_y) (x, y) =
(x-origin_x, origin_y - y)
@TheSeamau5
TheSeamau5 / multipageform.elm
Last active October 30, 2020 16:54
Simple multi-page form
import Html exposing (Html, Attribute)
import Html.Attributes
import Html.Events
import Signal exposing (Address)
import List
import String
import StartApp
------------------
--- HELPER CODE --