Skip to content

Instantly share code, notes, and snippets.

routesTo: (url, route_name)->
visit(url)
andThen ->
current_route = App.__container__.lookup('controller:application').currentRouteName
equal current_route, route_name, "Expected #{route_name}, got: #{current_route}"
@mfeckie
mfeckie / behaviour-element.hbs
Created October 4, 2015 10:31
Component that adds some behaviour with jQuery
<p>
I am clickable
</p>
@mfeckie
mfeckie / install_ex.sh
Created November 15, 2015 09:27 — forked from jimsynz/install_ex.sh
I use this to install Elixir on Codeship.
#!/bin/sh
# I use this to install Elixir on our codeship instances for testing. YMMV.
# curl -O https://gist.githubusercontent.com/jamesotron/44f8962cddef781ab830/raw/e75599e95587cbca26e707505fd40dd0f26eb0f5/install_ex.sh
# . ~/install_ex.sh
# You can override your Elixir and Erlang versions from your shell when you call ./install_ex.sh.
ERLANG_VERSION=${ERLANG_VERSION:-18.0.3}
ELIXIR_VERSION=${ELIXIR_VERSION:-1.1.1}
.section __TEXT,__text,regular,pure_instructions
.align 4, 0x90
__ZN4main20h0ed1c70a1930c642MaaE:
Lfunc_begin0:
.cfi_startproc
.cfi_personality 155, _rust_eh_personality
.cfi_lsda 16, Lexception0
pushq %rbp
Ltmp39:
.cfi_def_cfa_offset 16
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
actions: {
applyFilter () {
console.log(arguments);
}
}
});
import Ember from 'ember';
export default Ember.Component.extend({
});
@mfeckie
mfeckie / controllers.application\.js
Last active August 26, 2020 08:19
Patient Explorer
import Controller from '@ember/controller';
export default class ApplicationController extends Controller {
}
@mfeckie
mfeckie / controllers.application\.js
Last active September 23, 2020 14:03
Query Param issue reproduction
import Controller from '@ember/controller';
import { action } from '@ember/object';
import { tracked } from '@glimmer/tracking';
export default class ApplicationController extends Controller {
appName = 'Ember Twiddle';
queryParams = ['search', 'statuses'];
search = '';
statuses = [];
@action
@mfeckie
mfeckie / machine.js
Created October 8, 2020 06:57
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@mfeckie
mfeckie / machine.js
Last active October 9, 2020 01:15
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions