Skip to content

Instantly share code, notes, and snippets.

@JoelQ
JoelQ / elm-types-glossary.md
Last active February 14, 2024 14:29
Elm Type Glossary

Elm Types Glossary

There's a lot of type terminology and jargon going around when discussing types in Elm. This glossary attempts to list some of the most common type terms along with synonyms, terms from other language communities, examples, and links to more detailed articles on each topic.

@mdgriffith
mdgriffith / Instructions.md
Last active July 30, 2019 22:35
Elm UI Performance Mode

There's a new Elm performance mode.

If you’re still interested in trying it out, here’s how to ge it working.

  1. clone the elm-ui repo locally and point your source-directories to it.
    • You can make sure to checkout the commit for the latest release (1.1.1) in order to avoid pulling unpublished changes
  2. Enable the virtual css in elm land via
import Internal.Model as Internal

PDF Make Definitions

A list of all the properties for the Document Definition objects in PDF Make. Gathered from the examples source code. Up to date for version 0.1.38.

Basic definition

  • The Document Definition is a javascript object: {}. It can contain the following.
  • content: array. This defines the layout of your document. All your tags will be defined in there. You define tags using object (e.g. content: [{text: 'Hello World'}])
  • styles: object. A dictionary of all the named styles in your document. You can then apply a style to any object using style: 'name' or style: ['name1', 'name2']
  • defaultStyle: object. Defines a style to be applied to every element in the document.
  • images: object. Another dictionary that you can use to specify all the images in your document.
@akoppela
akoppela / README.md
Last active June 10, 2023 18:32
Custom Elements with ES5 syntax

You'll need to include two pollyfils before you include a code with your custom elements:

webcomponents/webcomponentsjs/custom-elements-es5-adapter.js - this is for new browsers in order to understand ES5 syntax

webcomponents/custom-elements/custom-elements.min.js - this is for old browsers without customElements support

You can add them to your index.html file in the following way:

<div id="custom-elements-adapter">
@lukewestby
lukewestby / CodeEditor.elm
Last active December 9, 2021 08:12
The custom element and Elm API that will drive Ellie's code editors
module Ellie.Ui.CodeEditor
exposing
( Attribute
, LinterMessage
, Position
, Severity(..)
, linterMessages
, mode
, onChange
, readOnly
module AvlTree exposing (..)
{- Using these definitions, it is impossible to construct an imbalanced binary tree -}
{- a Node encodes a single Node:
- holding a value of type `a`
- with the type of a tree of (height - 1) `t1`
- and the type of a tree of (height - 2) `t2`
-}
@evancz
evancz / Haskell-Style-Guide.md
Last active March 23, 2023 15:27
A style guide for Elm tools

Haskell Style Guide for Elm

Goal: a consistent style throughout all Elm projects that is easy to read and produces clean diffs to make debugging easier. This means valuing regularity and simplicity over cleverness.

Line Length

Keep it under 80 characters. Going over is not the end of the world, but consider refactoring before you decide a line really must be longer.

Variables