This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mutation resizeImage{ | |
small: resize(url:"http://i.imgur.com/sybkv4j.jpg", w: 100, h: 100) | |
medium: resize(url:"http://i.imgur.com/sybkv4j.jpg", w: 300, h: 300) | |
large: resize(url:"http://i.imgur.com/sybkv4j.jpg", w: 450, h: 450) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
by_loid(loid:"1.0.600860989") { | |
... on Story { | |
thumbnail { | |
...thumbnailInfo | |
} | |
headline | |
summary | |
} | |
... on LayoutContainer { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Json.Decode exposing (..) | |
import Html exposing (text) | |
main = | |
let | |
result = decodeString string "\"test\"" | |
in | |
case result of | |
Ok r -> | |
r |> toString |> text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Main exposing (..) | |
import Html exposing (text) | |
import Html.App as App | |
import MyApp exposing (init, update, subscriptions) | |
main : Program Never | |
main = | |
App.program |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
applyMessages : Model -> List Msg -> ( Model, Cmd Msg ) | |
applyMessages model msgs = | |
let | |
reduce : Msg -> ( Model, List (Cmd Msg) ) -> ( Model, List (Cmd Msg) ) | |
reduce msg ( oldModel, cmds ) = | |
let | |
( newModel, cmd ) = | |
update msg oldModel | |
in | |
( newModel, cmd :: cmds ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Html exposing (text) | |
import Json.Decode exposing (decodeString, int) | |
-- this won't work | |
i : String | |
i = | |
"726826386187374600" | |
main = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Start exposing (start, Config, App) | |
{-| This module helps you start your application in a typical Elm workflow. | |
It assumes you are following [the Elm Architecture][arch] and using | |
[elm-effects][]. From there it will wire everything up for you! | |
**Be sure to [read the Elm Architecture tutorial][arch] to learn how this all | |
works!** | |
[arch]: https://github.com/evancz/elm-architecture-tutorial |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// name | |
set nick "billsacks" | |
// computer settings/memory | |
set com_soundMegs 64 | |
set com_hunkMegs 128 | |
set com_zoneMegs 64 | |
set com_maxfps 125 | |
set com_blood 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import pymongo | |
import requests | |
import threading | |
from pprint import pprint | |
EXCHANGES = { | |
'mtgox': 'http://data.mtgox.com/api/2/BTCUSD/money/ticker', | |
'bitstamp': 'https://www.bitstamp.net/api/ticker/', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function EventEmitter() {} | |
EventEmitter.prototype.on = | |
EventEmitter.prototype.addListener = function (event, callback) { | |
this._events = this._events || {}; | |
this._events[event] = this._events[event] || []; | |
this._events[event].push(callback); | |
return this; | |
}; |