Skip to content

Instantly share code, notes, and snippets.

@bstro
bstro / controllers.application.js
Last active January 27, 2018 00:01
New Twiddle
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'table component',
});
$ ember install ember-redux
Installed packages for tooling via npm.
installing ember-redux
install addons ember-redux-shim@^1.1.0, ember-redux-thunk-shim@^1.0.0
Installed packages for tooling via npm.
installing ember-redux
install addons ember-redux-shim@^1.1.0, ember-redux-thunk-shim@^1.0.0
trying to install 1.1.1 to /Users/brendanstromberger/dev/vishnu-redux/node_modules/ember-redux-shim
but already installed versions [ '1.1.1' ]
trying to install 1.1.2 to /Users/brendanstromberger/dev/vishnu-redux/node_modules/ember-redux-thunk-shim
Running "amberc:all" (amberc) task
Warning: amber_dir needs to be a valid directory Use --force to continue.
Aborted due to warnings.
grunt exec error:
3
bstro:amber-scratch bstro$ npm -g list
/Users/bstro/n/lib
├─┬ amber-cli@0.15.0
│ ├── amber@0.15.1
import Html exposing (Html)
import Html.App as Html
import Html.Attributes as Attr
import WebGL exposing (..)
import AnimationFrame exposing (..)
import Basics.Extra exposing (never)
import List.Extra exposing (andThen)
import List exposing (concat)
import Time
import Window
import Html exposing (Html)
import Html.App as Html
import Html.Attributes as Attr
import WebGL exposing (..)
import AnimationFrame exposing (..)
import Basics.Extra exposing (never)
import List.Extra exposing (andThen)
import Time
import Window
import Mouse
(=>) = (,)
update : Msg -> Model -> (Model, Cmd Msg)
update msg model =
case msg of
NoOp
-> model
=> Cmd.none
Init res
module Main where
import Graphics.Element exposing (show)
import Json.Decode as Json exposing (decodeString, list, int, oneOf, string, (:=), object5, succeed)
type alias ID = Int
type alias Entry =
{ name : String
, birth : Int
, death : Int
module Main where
import Graphics.Element exposing (show)
import Json.Decode as Json exposing (decodeString, list, int, oneOf, string, (:=), object5, maybe, succeed)
type alias ID = Int
type alias Model =
{ entries : List Entry
, nextID : ID
}
@mixin keyframe($animation_name) {
@-webkit-keyframes $animation_name { @content }
@-moz-keyframes $animation_name { @content }
@-o-keyframes $animation_name { @content }
@keyframes $animation_name { @content }
}
var React = require('react/addons'),
supportPageOffset = window.pageXOffset !== undefined,
isCSS1Compat = ((document.compatMode || "") === "CSS1Compat"),
components = [],
lastValue = -1,
ticking = false,
windowHeight = window.innerHeight,
compose = function() { // from underscore
var args = arguments;
var start = args.length - 1;