I hereby claim:
- I am andrewhao on github.
- I am andrewhao (https://keybase.io/andrewhao) on keybase.
- I have a public key whose fingerprint is ABAD 072E 4722 22E2 9E81 F71C 9865 AEB1 52A6 945A
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| # elixir_buildpack.config | |
| config_vars_to_export=(SECRET_KEY_BASE SESSION_ENCRYPTED_COOKIE_SALT SESSION_ENCRYPTED_SIGNED_COOKIE_SALT DOMAIN) |
| class Checkout | |
| def initialize(booking_amount, discount) | |
| @booking_amount = booking_amount | |
| @discount = discount | |
| end | |
| def total | |
| @booking_amount.total - @discount.calculate_amount_for(booking_amount: booking_amount) | |
| end | |
| end |
| <?xml version="1.0" encoding="utf-8" ?> | |
| <!ELEMENT tsung (information?, clients, servers, monitoring?, load, options?, sessions)> | |
| <!ELEMENT information (name|description|username|organisation)*> | |
| <!ELEMENT name (#PCDATA)> | |
| <!ELEMENT description (#PCDATA)> | |
| <!ELEMENT username (#PCDATA)> | |
| <!ELEMENT organisation (#PCDATA)> |
| module Ridesharing | |
| class DriverController | |
| append_view_path(‘app/domains’) | |
| end | |
| end |
| module Ridesharing | |
| class RidesController < ApplicationController | |
| def post | |
| # Hail a time-traveling Delorean: | |
| HailDelorean.hail(current_user.id) | |
| render text: 'Hailing a cab, please wait for a response...' | |
| end | |
| end | |
| end |
Welcome to the :c5: Elm study sessions! In this 45-minute session Zoe and Andrew are going to try to lead you through the basics of the Elm language.
You will leave this session with a decent understanding of the core language.
Elm is a strongly-typed language developed by Evan Czaplicki (apparently, a high school classmate of Sue Anna's). It was a MIT senior thesis project of his (see his paper) in 2012.
| -- Todo.elm | |
| import Html exposing (Html, Attribute, button, div, ul, li, h1, text, input) | |
| import Html.Attributes exposing (..) | |
| import Html.Events exposing (onClick, onInput) | |
| main = | |
| Html.beginnerProgram { model = model, view = view, update = update } | |
| -- MODEL |
| # ----------------------------- | |
| # Passenger (Experience) Domain | |
| # ----------------------------- | |
| module Passenger | |
| # app/domains/passenger/find_driver_match.rb | |
| class FindDriverMatch | |
| include Wisper::Publisher | |
| def call(passenger, ride_requirements) | |
| # Publishes the event (a fact), but lets someone else do the rest of the hard work. |
| type alias Model = | |
| { name : String | |
| , phone : String | |
| } | |
| model : Model | |
| model = | |
| { name = "" | |
| , phone = "" |