Skip to content

Instantly share code, notes, and snippets.

module Main exposing (..)
import Html exposing (div, span, strong, text)
import Date
import Time
import Debug
import Date.Extra.Format exposing (isoString)
import Ext.Date
@gdotdesign
gdotdesign / elm-make-bug
Created July 11, 2016 03:43
Windows script to reproduce an elm-make bug
:loop
@echo off
rm -rf elm-make-bug
git clone git@github.com:gdotdesign/elm-make-bug.git > /dev/null 2>&1
cd elm-make-bug
elm-make Test.elm --yes > /dev/null 2>&1
perl -pi -e 's/A/B/g' Lib.elm
elm-make Test.elm --yes > /dev/null 2>&1
perl -pi -e 's/Lib.A/Lib.B/g' Bar.elm
elm-make Test.elm > /dev/null 2>&1
@gdotdesign
gdotdesign / elm-make-bug.sh
Created July 11, 2016 03:40
Script for testing an elm-make bug
#!/bin/bash
while true; do
rm -rf elm-make-bug
git clone git@github.com:gdotdesign/elm-make-bug.git > /dev/null 2>&1
cd elm-make-bug
elm-make Test.elm --yes > /dev/null 2>&1
perl -pi -e 's/A/B/g' Lib.elm
elm-make Test.elm --yes > /dev/null 2>&1
perl -pi -e 's/Lib.A/Lib.B/g' Bar.elm
@gdotdesign
gdotdesign / Dockerfile
Last active June 30, 2016 04:40
Dockering
FROM ubuntu:16.04
# Set Locale
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
# Setup
RUN apt-get update
@gdotdesign
gdotdesign / Main.elm
Last active May 26, 2016 06:58
Event handlers cannot be reattached after removing them.
import Html exposing (..)
import Html.Events exposing (..)
import Html.Attributes exposing (..)
import Html.App as App
import String
type alias Model =
{ haveEvent : Bool
, text : String
@gdotdesign
gdotdesign / EventListenerRemove.elm
Created May 15, 2016 09:38
Event listener not removed
import Html exposing (..)
import Html.Events exposing (..)
import Html.Attributes exposing (..)
import Html.App as App
import String
type alias Model =
{ haveTabindex : Bool
, text : String
@gdotdesign
gdotdesign / tabindex.elm
Created May 14, 2016 13:15
Tabindex not getting removed.
module Main exposing (..)
import Html exposing (..)
import Html.Events exposing (..)
import Html.Attributes exposing (..)
import Html.App as App
import String
type alias Model =
@gdotdesign
gdotdesign / Mail.elm
Created May 5, 2016 07:57
Uncaught TypeError: Cannot read property 'index' of undefined
import Html.Attributes exposing (style)
import Html.Events exposing (onClick, onMouseDown)
import Html exposing (node, div, text)
import Html.App
import Html.Lazy
type alias Model =
{ color : String
, clicks : Int
@gdotdesign
gdotdesign / Main.elm
Created May 5, 2016 05:35
Uncaught TypeError: Cannot read property 'decoder' of null
import Html.Attributes exposing (style)
import Html.Events exposing (onClick, onMouseDown)
import Html exposing (node, text)
import Html.App
type alias Model =
{ color : String
, clicks : Int
}
@gdotdesign
gdotdesign / Main.elm
Created May 5, 2016 05:33
Uncaught TypeError: Cannot use 'in' operator to search for 'click' in test
import Html.Attributes exposing (classList)
import Html.Events exposing (onClick, onMouseDown)
import Html exposing (node, text)
import Html.App
type alias Model =
{ color : String
, clicks : Int
}