Skip to content

Instantly share code, notes, and snippets.

ndreynolds / components.actions-test.js
Last active July 12, 2017 09:40
Action Playground
View components.actions-test.js
import Ember from 'ember';
export default Ember.Component.extend({
actions: {
clickWithClosureAction() {
this.attrs.onClickWithClosureAction(); // or this.get('onClickWithClosureAction')()
clickWithSendAction() {

Keybase proof

I hereby claim:

  • I am ndreynolds on github.
  • I am ndreynolds ( on keybase.
  • I have a public key ASABbioTmvJdreU-G5RCMtJePRHzxByI-FPGCJwmq9BydAo

To claim this, I am signing this object:

ndreynolds /
Last active August 29, 2015 14:16
Zug Simulator

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)