Skip to content

Instantly share code, notes, and snippets.

Alex Matchneer machty

View GitHub Profile
View pumpkin-roll.md

Cream Cheese Pumpkin Roll

Ingredients

  • 3 eggs
  • 2/3 cup canned pumpkin
  • 1 cup sugar
  • 1 teaspoon of baking soda
  • 1/2 teaspoon ground cinnamon
  • 3/4 cup of flour
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
get foo() {
return "i was returned from the getter foo";
}
});
View controllers.application.js
import Ember from 'ember';
import { task, timeout, waitForProperty } from 'ember-concurrency';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
count: 0,
foo: task(function() {
return {
@machty
machty / ember-cli-build.js
Last active Jul 15, 2019
Broccoli challenges
View ember-cli-build.js
/* jshint node: true */
const EmberApp = require('ember-cli/lib/broccoli/ember-app');
const generateWhitelabelIndexes = require('./generate-whitelabel-indexes');
module.exports = function(defaults) {
const app = new EmberApp(defaults, {
// ...all sorts of config
});
View controllers.application.js
import Ember from 'ember';
let guid = () => (Math.random().toString(36) + '00000000000000000').slice(2, 14)
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
vol: Ember.computed(function() {
return guid();
}).volatile(),
actions: {
View controllers.application.js
import Ember from 'ember';
import { lifespan, subscription } from "../subscription";
import { bind } from '@ember/runloop';
import { task, timeout } from 'ember-concurrency';
export default Ember.Controller.extend({
chatRooms:[ "EmberChat", "ReactChat", "VueChat", "AngularChat"],
chatRoom: null,
// chatRoomName: null,
View controllers.application.js
import Ember from 'ember';
import { subscription } from "../subscription";
import { bind } from '@ember/runloop';
import { task, timeout } from 'ember-concurrency';
export default Ember.Controller.extend({
chatRooms:[ "EmberChat", "ReactChat", "VueChat", "AngularChat"],
chatRoomName: null,
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
bar: "bar_initial",
foo: Ember.computed('bar', {
set(key, value) {
return `setter(${value})`;
@machty
machty / journal.md
Created Jun 18, 2018
ember-testing journal
View journal.md

Ember Testing Journal

We've been driving all of our Ember tests with end-to-end Capybara tests running from our Rails server for some time. There are many upsides to this approach, but Capybara tests are generally slow and brittle, so we'd likely to start investing in client-side only Ember tests that don't actually hit the server at all.

Given that I don't have a lot of experience with Ember tests, I wanted to keep a journal of first impressions and snags I encountered along the way, so that perhaps this information will be useful for documentation maintainers or whomever.

Figuring out how to stub a service in an acceptance test

Screencast of me talking through my through process

You can’t perform that action at this time.