Skip to content

Instantly share code, notes, and snippets.

View frpaulas's full-sized avatar

Paul Sutcliffe frpaulas

View GitHub Profile
module NoteSaver where
import Html exposing (..)
import Html.Attributes exposing (class)
import StartApp
import Effects
app =
StartApp.start
{ init = (initialModel)
module Saints where
import Http
import Html exposing (Html)
import Task exposing (Task, andThen, toResult)
import Json.Decode as Json exposing ((:=))
-- queries postgres for authentication token
-- displays token
-- successful query comes back with 201 status and body {"token": "longSecretToken"}
{
"version": "2.0.1",
"summary": "Fast markdown parsing and rendering",
"repository": "https://github.com/evancz/elm-markdown.git",
"license": "BSD3",
"source-directories": [
"src"
],
"exposed-modules": [
"Markdown"
ChangeDay day ->
let
bar =
Signal.send tomorrowFrom.address model.today
|> Task.toMaybe
|> Task.map NoOp
|> Effects.task
in
(model, Effects.none)
defmodule Iphod.Mixfile do
use Mix.Project
def project do
[app: :iphod,
version: "0.0.1",
elixir: "~> 1.2.0",
elixirc_paths: elixirc_paths(Mix.env),
compilers: [:phoenix, :gettext] ++ Mix.compilers,
build_embedded: Mix.env == :prod,
athomeanglican:iphod paulsutcliffe$ iex -S mix
Erlang/OTP 18 [erts-7.2] [source-e6dd627] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]
mix.exs:12: warning: undefined module attribute @version, please remove access to @version or explicitly set it before access
Interactive Elixir (1.2.0) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)>
Building release with MIX_ENV=prod.
==> Generating relx configuration...
==> Generating sys.config...
==> Generating boot script...
==> Packaging consolidated protocols...
==> Generating release...
===> Starting relx build process ...
===> state(api):
log: (3:debug),
config file: /Users/paulsutcliffe/Documents/I/iphod/rel/files/relx.config
@frpaulas
frpaulas / versionSelect.elm
Last active June 24, 2016 09:13
select option
type Msg
= NoOp
| Checked Key String
| ChangeVersion String
| ChangeFootnote Bool
update: Msg -> Model -> Model
update msg model =
case msg of
NoOp -> model
@frpaulas
frpaulas / calendar view
Created June 27, 2016 21:59
Second modal cause repeated reloads with iOS 9+ safari
<div id= "header-elm-container"></div>
<div>
<table id= "calendar">
<tr>
<th class= "mpep_link" colspan= "3"><a href= "morningPrayer"><button>Morning Prayer</button></a></th>
<th class= "mpep_link">Today</th>
<th class= "mpep_link" colspan= "3"><a href= "eveningPrayer"><button>Evening Prayer</button></a></th>
</tr>
<tr>
<th class= "season_link" colspan= "2">
var firstReading = Observable()
// mp1 has two Objects of
// {title: title, chap: chap, vsFrom: vsFrom, vsTo: vsTo, vss: vss}
mp1.forEach(function(el) {
var obj = getReading(el.read);
obj.type = el.style;
firstReading.add(obj);
})