Skip to content

Instantly share code, notes, and snippets.

View usman88's full-sized avatar

Usman usman88

View GitHub Profile
@usman88
usman88 / main.elm
Last active May 15, 2016 00:41
My First Elm Program
import Html exposing (text)
apple = { color = "Red" }
pear = { color = "Green" }
whatFruit {color} =
if color == "Red" then
"It's red, and it must be an apple!"
else if color == "Green" then
"It's green, so it must be a pear!"
$.PeriodicalUpdater('/notifications', {
method: 'GET',
data: id: $field_id,
cookie: false,
maxTimeout: 5000,
error: function (xhr,status,message) {
// Do stuff
// Insert handle.stop() here
}
}, function (remoteData, success, xhr, handle){