Skip to content

Instantly share code, notes, and snippets.

View dazulu's full-sized avatar
💻
codepen.io/dazulu

Adrian Payne dazulu

💻
codepen.io/dazulu
View GitHub Profile
@stolinski
stolinski / providerCompose.js
Created April 23, 2019 17:40
ProviderComposer
function ProviderComposer({ contexts, children }) {
return contexts.reduceRight(
(kids, parent) =>
React.cloneElement(parent, {
children: kids,
}),
children
);
}
@notyy
notyy / 3-form.elm
Last active July 21, 2019 17:46
implement a submit button in elm form guide
import Html exposing (..)
import Html.App as Html
import Html.Attributes exposing (..)
import Html.Events exposing (onInput, onClick)
import String exposing (length)
main =
Html.beginnerProgram
{ model = { name = "", password = "", passwordAgain = "", validationResult = NotDone }
@greenboyroy
greenboyroy / glossary.php
Last active October 28, 2017 06:03
Using Perch to create an alphabet of links for a collection or list/detail page.
<main role="main" class="glossary">
<div class="group">
<?php
// setup alphabet array for navigation
// make array of letters in span tags
$nav_arr = array(
'0-9' => '<span>0-9</span>'
);
for ($i = 65; $i <= 90; $i++) {
$nav_arr[chr($i)] = '<span>'.chr($i).'</span>';