Skip to content

Instantly share code, notes, and snippets.

@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
}
@gdotdesign
gdotdesign / Main.elm
Last active May 5, 2016 04:34
Attribute unexpectedly removed
module Main exposing (..)
import Html.Attributes exposing (style)
import Html.Events exposing (onClick)
import Html exposing (node, text)
import Html.App
type alias Model =
{ color : String
@gdotdesign
gdotdesign / Error #1
Created April 28, 2016 13:21
Elm 0.17 - Lazy error
149lazy_test.elm:6939 Uncaught Error: Ran into an unknown patch!
applyPatch @ lazy_test.elm:6939
applyPatches @ lazy_test.elm:6889
updateIfNeeded @ lazy_test.elm:6277
type Action
= Tasks ()
| RunTask
update : Action -> Model -> (Model, Effects.Effects Action)
update action model =
case action of
RunTask ->
(model, sendAsEffect address value Tasks)
sendAsEffect : Signal.Address a -> a -> (() -> b) -> Effects.Effects b
sendAsEffect address value action =
Signal.send address value
|> Effects.task
|> Effects.map action
type alias Model tag id err =
{ create : String -> List tag -> Task err tag
, failAddress : Maybe (Signal.Address err)
, remove : tag -> Task err tag
, input : Ui.Input.Model
, label : tag -> String
, tags : List tag
, removeable : Bool
, id : tag -> id
, disabled : Bool
@gdotdesign
gdotdesign / Ext.Date.Elm
Last active December 22, 2015 15:11
Date Stuff
module Ext.Date where
{-| Utility functions for dates.
# Create
@docs now, createDate
# Querying
@docs month, daysInMonth, datesInMonth
@gdotdesign
gdotdesign / api.cr
Created December 18, 2015 13:29
Jarvis
require "kemal"
require "process"
require "redis"
require "secure_random"
class Action
def run
end
end
@gdotdesign
gdotdesign / .rubocop.yml
Last active August 29, 2015 14:06
DiNa Rubocop Config
AllCops:
RunRailsCops: true
Style/AccessModifierIndentation:
EnforcedStyle: indent
Style/AlignHash:
Enabled: false
Style/AlignParameters: