Skip to content

Instantly share code, notes, and snippets.

View lenards's full-sized avatar

Andrew Lenards lenards

  • Tucson, AZ
View GitHub Profile
module ID exposing (ID(..), decodeFromString, decoder, encode, encodeAsString, fromInt, toInt, toString)
import Json.Decode as Decode exposing (Decoder)
import Json.Encode as Encode exposing (Value)
{-| This type ensures you get a type error if you for example accidentally pass a UserId in place of a CompanyId
-}
type ID phantom
= ID Int
/* Styles for hiding the native radio button */
input[type='radio'].check-custom {
position: absolute;
left: -10000px;
top: auto;
width: 1px;
height: 1px;
overflow: hidden;
}
/* Styles for hiding the native checkbox */
input[type='checkbox'].check-custom {
position: absolute;
left: -10000px;
top: auto;
width: 1px;
height: 1px;
overflow: hidden;
}
/* Styles for hiding the native checkbox */
input[type='checkbox'].check-custom {
position: absolute;
left: -10000px;
top: auto;
width: 1px;
height: 1px;
overflow: hidden;
}
/* Styles for the hover state of the custom checkbox */
input[type='checkbox'].check-custom:hover ~ .check-toggle {
border-color: #4a4a4a;
}
/* Styles for the focus state of the custom checkbox */
input[type='checkbox'].check-custom:focus ~ .check-toggle {
border-color: #b0d5ff;
box-shadow: 0 0 0 2px rgba(23, 133, 255, 0.25);
}
input[type='checkbox'].check-custom ~ .check-toggle {
width: 1rem;
height: 1rem;
position: relative;
display: inline-block;
vertical-align: middle;
border: 2px solid #969696;
border-radius: 50%;
cursor: pointer;
}
input[type='checkbox'].check-custom {
position: absolute;
left: -10000px;
top: auto;
width: 1px;
height: 1px;
overflow: hidden;
}
@JoelQ
JoelQ / elm-maybe-map-compose.md
Created February 9, 2018 15:52
Refactoring a pipeline of Maybe.map functions in Elm

Refactoring maybe code in Elm

Given this ugly series of cases:

optionalFormattedFriendAddress : Maybe Friend -> Maybe String
optionalFormattedFriendAddress maybeFriend =
  let
    maybeAddress = case maybeFriend of
      Just friend -> Just friend.address
@subfuzion
subfuzion / github-wiki-how-to.md
Last active November 26, 2024 06:01
GitHub Wiki How-To

How do I clone a GitHub wiki?

Any GitHub wiki can be cloned by appending wiki.git to the repo url, so the clone url for the repo https://myorg/myrepo/ is: git@github.com:myorg/myrepo.wiki.git (for ssh) or https://github.com/my/myrepo.wiki.git (for https).

You make edits, and commit and push your changes, like any normal repo. This wiki repo is distinct from any clone of the project repo (the repo without wiki.get appended).

How do I add images to a wiki page?