Skip to content

Instantly share code, notes, and snippets.

View rluiten's full-sized avatar

Robin Luiten rluiten

  • Brisbane/Australia
View GitHub Profile
@rluiten
rluiten / SketchSystems.spec
Last active July 4, 2023 03:12 — forked from lynaghk/SketchSystems.spec
# Robins hack to maybe try do the 10 seconds required to tick?
# Robins hack to maybe try do the 10 seconds required to tick?
Egg Timer*
Stopped*
wind forward -> Done?
Ticking
wind forward -> Running Done?
wind backward -> Done?
tick -> Running Done?
@rluiten
rluiten / SketchSystems.spec
Last active July 4, 2023 03:14 — forked from lynaghk/SketchSystems.spec
# Robins changes to Traffic Light UI example for
# Robins changes to Traffic Light UI example for
Search Bar Hacked*
Inactive*
focused -> Active
submitted -> Empty Search
Active
canceled -> Inactive
typed -> Text Entry
@rluiten
rluiten / EqualTypes.ts
Last active October 2, 2020 09:04
Example of filterOptions, EqualTypes.
// prettier-ignore
// Compare types for equivalence
// Reference: https://github.com/Microsoft/TypeScript/issues/27024
//
// Better fix coming in Typescript 4 ? my read isn't clear on this
// Reference: https://github.com/microsoft/TypeScript/issues/37314#issuecomment-598459316
export type EqualTypes<X extends unknown, Y extends unknown> =
(<T>() => T extends X ? 1 : 2) extends
(<T>() => T extends Y ? 1 : 2) ? true : false;
@rluiten
rluiten / reformed.tsx
Last active January 19, 2018 09:44
Implementation of react-reformed type safe high order component in typescript, this is formatted with prettier with single quotes option. It may not be perfect but I have already found it useful. Suggestions for improvements are welcomed.
// This is a typescript version of react-formed.
// Reference: https://github.com/davezuko/react-reformed
//
// Good reference on creating high order components in Typescript.
// Reference: https://dev.to/danhomola/react-higher-order-components-in-typescript-made-simple
import * as React from 'react';
import * as assign from 'object-assign';
// State of the HOC you need to compute the InjectedProps
interface State<TModel> {
@rluiten
rluiten / redux-form.d.ts
Last active August 5, 2016 14:59
Basic typescript definition for redux-form v6. This is new and I am new to creating type definitions and I am only just getting into redux-form so it may well have errors, and be less strict than it can be. Updated 2016-07-08 again.
/**
* Type definitions for Redux-form v6.
* Updated for 6.0.0-rc.3 including splitting of Field properties to 'input'.
*/
import {Component, ComponentClass, StatelessComponent, ReactElement, ReactEventHandler, SyntheticEvent} from 'react';
import {Dispatch, Reducer, Action} from 'redux';
declare namespace ReduxForm {
export type FieldValue = any;
<!DOCTYPE HTML>
<html><head><meta charset="UTF-8"><title>Main</title><style>html, head, body { padding:0; margin:0; }
body { font-family: calibri, helvetica, arial, sans-serif; }
a:link { text-decoration: none; color: rgb(15,102,230); }
a:visited { text-decoration: none; }
a:active { text-decoration: none; }
a:hover { text-decoration: underline; color: rgb(234,21,122); }
html,body { height: 100%; margin: 0px; }
</style></head><body><script>var Elm = Elm || { Native: {} };
Elm.Native.Basics = {};