Skip to content

Instantly share code, notes, and snippets.

let styles = StyledComponents.import "./test.module.css"
let view (model : Model) (dispatch : Msg -> unit) =
div [styles "test"] [str "test"]
import Html exposing (..)
import Html.Events exposing (onClick)
type alias F = Int -> Int
mailbox = Signal.mailbox identity
view address value = div [] [ text <| toString value
, button [onClick address ((+) 1)] [text "+"]
, button [onClick address ((-) 1)] [text "-"]
@Zeroto
Zeroto / gist:8e5ac7945e93f4e50a3a
Created November 14, 2014 13:16
EventManager
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Events
{
class EventManager
{
private static EventManager instance = null;
@Zeroto
Zeroto / 01DIContainer.cs
Last active August 29, 2015 14:03
Basic DI container for Unity
using System;
using System.Collections.Generic;
using System.Reflection;
using UnityEngine;
namespace UnityDI
{
public class DIContainer
{
/// <summary>