Skip to content

Instantly share code, notes, and snippets.

View components.actions-test.js
import Ember from 'ember';
export default Ember.Component.extend({
actions: {
clickWithClosureAction() {
this.attrs.onClickWithClosureAction(); // or this.get('onClickWithClosureAction')()
},
clickWithSendAction() {
this.sendAction('onClickWithSendAction');
},
View keybase.md

Keybase proof

I hereby claim:

  • I am ndreynolds on github.
  • I am ndreynolds (https://keybase.io/ndreynolds) on keybase.
  • I have a public key ASABbioTmvJdreU-G5RCMtJePRHzxByI-FPGCJwmq9BydAo

To claim this, I am signing this object:

@ndreynolds
ndreynolds / README.md
Last active Aug 29, 2015
Zug Simulator
View README.md

Zug Simulator

In this exercise, we'll model the behavior of an U-Bahn or S-Bahn train.

Given a route which provides stations (just strings), the train's current station, and whether or not it's traveling in reverse (i.e., from the last stop to the first stop), the train should complete the route in the correct direction.

When the train's complete_route method is called, it should print a summary

View knapsack.clj
; doll_smuggler in Clojure
(defstruct doll :ident :weight :value)
(def dolls [
(struct doll "luke" 9 150)
(struct doll "anthony" 13 35)
(struct doll "candice" 153 200)
(struct doll "dorothy" 50 160)
(struct doll "puppy" 15 60)