Skip to content

Instantly share code, notes, and snippets.

View avh4's full-sized avatar

Aaron VonderHaar avh4

View GitHub Profile
@avh4
avh4 / Main.elm
Last active September 1, 2016 06:26
Intro to Elm Notes - SF Elm meetup 2016-08-17
module Main exposing (..)
import Html exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (..)
import Html.App
main =
Html.App.beginnerProgram
@avh4
avh4 / LightButton.elm
Last active July 29, 2016 08:44
Intro to Elm - SF Elm meetup 2016-07-27
module LightButton exposing (view)
import Html
import Html.Attributes
import Html.Events
colorForBool : Bool -> String
colorForBool bool =
if bool then
@avh4
avh4 / Main.elm
Last active July 15, 2016 17:56
Intro to Elm - SF Elm meetup 2016-07-14
module Main exposing (..)
import Html.App
import WordThing
-- WIRING
main : Program Never
@avh4
avh4 / Main.elm
Last active June 23, 2016 15:10
Intro to Elm - SF Elm meetup 2016-06-22
module Main exposing (..)
import Html.App
import Html exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (onClick, onInput)
import String
type alias Model =
@avh4
avh4 / Main.hs
Last active June 12, 2016 19:43
IO Either
import Control.Monad.Except (ExceptT, runExceptT)
import Data.Functor.Identity (Identity)
start :: ExceptT String IO String
start =
return "start"
next1 :: String -> String
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.0</real>
module FakeSet (Set, member, empty, union, remove, insert) where
type alias Set a =
List a
member : a -> Set a -> Bool
member expected set =
List.any ((==) expected) set
@avh4
avh4 / gist:80c1217c9ed023ec7d35
Created March 18, 2016 17:15
Atom shortcuts
  • cmd-shift-\ to reveal the current open file in the tree view