Moved to https://github.com/ElmLive/police-reform/tree/ElmLive-2016-08-21
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env stack | |
-- stack --resolver lts-12.14 script | |
{-# LANGUAGE OverloadedStrings #-} | |
{- | |
This is a handy illustration of converting between five of the commonly-used | |
string types in Haskell (String, ByteString, lazy ByteString, Text and lazy | |
Text). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Duckling exposing (main) | |
{-| This demo loads a convex shape and a mesh from the same OBJ file. | |
- elm-physics is used for simulation | |
- elm-3d-scene is used for rendering | |
It is important to keep the convex shape as small as possible, because | |
this affects the simulation performance. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- CountOpenSafariTabs.scpt | |
-- Author: Chad Armstrong | |
-- Date: 13 May 2016 | |
-- Description: Count the number of open tabs in Safari | |
-- To run from CLI: osascript CountOpenSafariTabs.scpt | |
tell application "Safari" | |
--Variables | |
set winlist to every window |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Main exposing (main) | |
import Element exposing (..) | |
import Element.Background as Background | |
import Element.Border as Border | |
import Element.Font as Font | |
main = | |
layout [] <| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE PolyKinds #-} | |
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE TypeFamilyDependencies #-} | |
{-# LANGUAGE AllowAmbiguousTypes #-} | |
{-# LANGUAGE StandaloneDeriving #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE UndecidableInstances #-} | |
{-# LANGUAGE Rank2Types #-} | |
data Never |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE UndecidableInstances #-} | |
{-# LANGUAGE TypeSynonymInstances #-} | |
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE Rank2Types #-} | |
{-# LANGUAGE LambdaCase #-} | |
{-# LANGUAGE StandaloneDeriving #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
import Data.Functor.Identity (Identity(..)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Html | |
import Html.Events | |
import Json.Decode | |
onClickPreventDefaultForLinkWithHref : msg -> Html.Attribute msg | |
onClickPreventDefaultForLinkWithHref msg = | |
let | |
isSpecialClick : Json.Decode.Decoder Bool | |
isSpecialClick = | |
Json.Decode.map2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
git fetch | |
CURRENT="$(git rev-parse --abbrev-ref HEAD)" | |
# find where the current branch branched from origin/master | |
REFERENCE="origin/master" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- the type aliases would be private | |
type RichText | |
= RichText (List Line) | |
type alias Line = | |
{ left : List (Attributes, String) | |
, center : List (Attributes, String) | |
, right : List (Attributes, String) |
NewerOlder