Skip to content

Instantly share code, notes, and snippets.

View lenards's full-sized avatar

Andrew Lenards lenards

  • Tucson, AZ
View GitHub Profile
@lenards
lenards / Example.elm
Created April 20, 2019 04:00
If you place `Example.elm` under a "tests" directory, then `npm run test` should correctly execute `elm-test`
module Example exposing (Event, decoderSuite, eventDecoder)
import Expect exposing (Expectation)
import Json.Decode as Json exposing (Decoder)
import Json.Decode.Pipeline exposing (optional, required)
import Test exposing (..)
type alias Event =
{ date : String
/* Styles for the hover state of the custom checkbox */
input[type='checkbox'].check-custom:hover ~ .check-toggle {
border-color: #4a4a4a;
}
/* Styles for the checked state of the custom checkbox */
input[type='checkbox'].check-custom:checked ~ .check-toggle {
border-color: #1785ff;
background: #1785ff url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IiNmZmZmZmYiIHN0cm9rZS13aWR0aD0iMyIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48cG9seWxpbmUgcG9pbnRzPSIyMCA2IDkgMTcgNCAxMiI+PC9wb2x5bGluZT48L3N2Zz4=) center no-repeat;
background-size: 75%;
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 {
top: 0;
left: 0;
width: 0;
height: 0;
opacity: 0;
filter: alpha(opacity=0);
position: absolute;
visibility: hidden;
}
/* Styles for hiding the native checkbox */
input[type='checkbox'].check-custom {
top: 0;
left: 0;
width: 0;
height: 0;
opacity: 0;
filter: alpha(opacity=0);
position: absolute;
visibility: hidden;
/* Styles for hiding the native radio button */
input[type='radio'].check-custom {
top: 0;
left: 0;
width: 0;
height: 0;
opacity: 0;
filter: alpha(opacity=0);
position: absolute;
visibility: hidden;
@lenards
lenards / elm-0-19-elm-install-attempt
Last active March 20, 2019 00:42
This is the output from `elm.cmd install` as of elm 0.19 (0.19-bugfix6). The `package` command is no longer available, and `elm install :package-name` is only used when you are installing to the Elm module manifest, aka `elm.json`. See the note about how the command doesn't use the same approach as `npm install`.
> ..\node_modules\.bin\elm.cmd install
-- INSTALL WHAT? ---------------------------------------------------------------
I am expecting commands like:
elm install elm/http
elm install elm/json
elm install elm/random
@lenards
lenards / elm-resources.md
Last active August 20, 2018 23:03
A short list for a brief "experience report" talk in August 2018 on my first 5 months coding in Elm
@lenards
lenards / openrc-test-example.sh
Created May 26, 2018 23:30
Here are the examples that I was using that have made up, Star Wars inspired, values
#!/usr/bin/env bash
# To use an OpenStack cloud you need to authenticate against the Identity
# service named keystone, which returns a **Token** and **Service Catalog**.
# The catalog contains the endpoints for all services the user/tenant has
# access to - such as Compute, Image Service, Identity, Object Storage, Block
# Storage, and Networking (code-named nova, glance, keystone, swift,
# cinder, and neutron).
#
# *NOTE*: Using the 3 *Identity API* does not necessarily mean any other
# OpenStack API is version 3. For example, your cloud provider may implement

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.

How do I add images to a wiki page?

You need to clone the wiki repo and edit it on your system.