This file contains hidden or 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
{- Escaping & unescaping some html in strings | |
We port over the lodash approach to escaping & unescaping. This does a more minimal approach suitable for large | |
blocks of html rather than for, say, strings that you're going to put into an html attribute or something. For | |
reasoning and more aggressive escaping see: | |
- https://wonko.com/post/html-escaping/ | |
- https://package.elm-lang.org/packages/marcosh/elm-html-to-unicode/latest/ | |
These have been introduced as the more aggressive escaping ends up escaping spaces as well which feels like than |
This file contains hidden or 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 Browser | |
import Browser.Navigation | |
import Html exposing (..) | |
import Html.Attributes exposing (..) | |
import Html.Events exposing (preventDefaultOn) | |
import Json.Decode as Json | |
import Url exposing (Url) |
This file contains hidden or 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
port module Main exposing (..) | |
import Html exposing (..) | |
import Html.App | |
import Html.Events | |
import Html.Attributes | |
main = | |
Html.App.programWithFlags |
This file contains hidden or 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.Events exposing (onClick) | |
import Html exposing (..) | |
import Html.App | |
type alias Model = | |
{ clicks : Int | |
} | |
This file contains hidden or 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/sh | |
# This is a command to visualise all the commit objects in a git repository | |
# in gitk. The benefit is that you see all of the orphaned commit objects | |
# which you have left behind when rebasing or deleting branches. | |
# I was interested in this partly as an educational tool to show people how | |
# safe some of these history editing operations are, as the commits are all | |
# still there. I'm also keen to see how useful it is as a kind of visual | |
# alternative to the reflog command. The reflog is awesome and I'm getting |