Skip to content

Instantly share code, notes, and snippets.

View pootsbook's full-sized avatar

Philip Poots pootsbook

  • ClubCollect
  • Alphen aan den Rijn, NL
View GitHub Profile
@staltz
staltz / migration-guide.md
Last active December 19, 2023 22:14
How to show migration guides in GitHub Markdown

How to show migration guides in GitHub Markdown

Use the diff code highlighting tag.

  ```diff
  - foo
  + bar

Example:

@berndca
berndca / HttpAction.elm
Last active January 21, 2016 17:43
Http.getString at startup
import StartApp
import Http
import Markdown
import Html exposing (Html, div, button, text)
import Html.Events exposing (onClick)
import Task exposing (Task)
import Effects exposing (Effects)
-- the URL of the README.md that we desire
readmeUrl : String
@robertknight
robertknight / elm-setup-notes.md
Created November 14, 2015 07:29
Elm setup notes

Elm Tutorial Notes

  1. Went to elm-lang hopepage, skimmed the initial instructions, went for the Install option so I could develop in my preferred editor (Atom).
  2. Not obvious where to go next after that, went to the Docs link at the top. Was expecting to find an 'Intro to Elm' guide. In lieu of that, picked the next most obvious thing which was walking through the Quick Start links.
-- paste into http://elm-lang.org/try and click "compile"
-- http://imgur.com/gallery/W6TwgZw
import Graphics.Collage exposing (..)
import Graphics.Element exposing (..)
import Text
import Color exposing (..)
import Time
import Signal
@mgold
mgold / using_mailboxes_in_elm.md
Last active March 24, 2020 16:05
Using Mailboxes in Elm: a tutorial blog post

Using Mailboxes in Elm

Max Goldstein | July 30, 2015 | Elm 0.15.1

In Elm, signals always have a data source associated with them. Window.dimensions is exactly what you think it is, and you can't send your own events on it. You can derive your own signals from these primitives using map, filter, and merge, but the timing of events is beyond your control.

This becomes a problem when you try to add UI elements. We want to be able to add checkboxes and dropdown menus, and to receive the current state of these elements as a signal. So how do we do that?

The Bad Old Days

@ef4
ef4 / select.hbs
Last active October 7, 2021 09:41
Goodbye old Select View
<select onchange={{action (mut vehicle) value="target.value"}}>
{{#each vehicles key="@item" as |vehicleChoice|}}
<option value={{vehicleChoice}} selected={{eq vehicle vehicleChoice}}>{{vehicleChoice}}</option>
{{/each}}
</select>
import Ember from 'ember';
import XHR from 'ember-xhr';
/**
* On the rails server, this creates an active record that stores the
* filename and generates the pre-signed url, the return format is
* something like:
*
* {
* "upload": {
@lukemelia
lukemelia / note.txt
Created April 8, 2015 04:34
When Error: watch EMFILE strikes (OS X)
This requires `brew install jq` which is a command json query.
I got this from @krisselden
@eccegordo
eccegordo / intro-to-ember-cli-node.md
Created March 21, 2015 11:14
Introduction to Ember CLI, Node and NPM

Introduction To Node, NPM and Ember CLI

This guide is for developers who are new Node, NPM, and Ember CLI. This guide is designed to get you started with ember cli development and provide some general background info on what Node is and how it works with Ember CLI.

Overview

  • What is Node?
  • What is NPM?
  • How do I setup my environment if I don't have node js or npm installed?
  • I accidently installed something wrong how can I start over?