Skip to content

Instantly share code, notes, and snippets.

module Main exposing (..)
import Html exposing (text)
import Html.App as App
import MyApp exposing (init, update, subscriptions)
main : Program Never
main =
App.program
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 )
import Html exposing (text)
import Json.Decode exposing (decodeString, int)
-- this won't work
i : String
i =
"726826386187374600"
main =
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
package main
import "honnef.co/go/js/console"
func main() {
console.Log("hello")
}
request = require 'request'
_ = require 'lodash'
Nightmare = require 'nightmare'
nightmare = new Nightmare()
findImages = (link) ->
nightmare
.goto link
.wait()
#.evaluate getImages, logImages
var lab_data = nio.src.socketio('http://54.197.236.34:443')('lab');
function digitalSensor(selector, on_text, off_text) {
var el = d3.select(selector);
return _.assign({}, nio._streamer, {
write: function (data) {
if (data == 'on') {
el.selectAll('.status').html(on_text);
el.attr('status', 'on');
<link rel="import" href="../components/polymer/polymer.html">
<link rel="import" href="/components/polymer/polymer.html">
<polymer-element name="my-element">
<template>
<style>
#core_drawer_panel {
position: absolute;
top: 620px;
@liamcurry
liamcurry / autoexec.cfg
Last active January 4, 2016 15:39
ET config
// 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
@liamcurry
liamcurry / gist:7894401
Created December 10, 2013 17:20
Store common bitcoin exchange ticker data in MongoDB
#!/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/',