Skip to content

Instantly share code, notes, and snippets.

View acorncom's full-sized avatar

David Baker acorncom

View GitHub Profile
import Controller from '@ember/controller';
export default class ApplicationController extends Controller {
appName = 'Ember Twiddle';
}
@acorncom
acorncom / adapters.application.js
Created November 19, 2018 00:12 — forked from runspired/adapters.application.js
Ember Data | Save Transaction
import Adapter from 'ember-data/adapters/json-api';
import Ember from 'ember';
import RSVP from 'rsvp';
const { Promise } = RSVP;
const { get } = Ember;
class Transaction {
constructor(store, ModelClass, primary, transactionMembers) {
this.store = store;
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
@acorncom
acorncom / travis.yml
Created December 21, 2016 21:37 — forked from ef4/travis.yml
Example of ember-cli-deploy from travis
deploy:
- provider: script
skip_cleanup: true
script: node_modules/.bin/ember deploy development --activate --verbose
on:
branch: master
- provider: script
skip_cleanup: true
script: node_modules/.bin/ember deploy staging --activate --verbose
on:
@acorncom
acorncom / router.js
Created December 21, 2016 21:24 — forked from ef4/router.js
deeply nested routes
import Ember from 'ember';
import config from './config/environment';
const Router = Ember.Router.extend({
location: 'none',
rootURL: config.rootURL
});
Router.map(function() {
this.route('outside', { path: '/' }, function() {
@acorncom
acorncom / controllers.application.js
Last active November 30, 2016 20:45 — forked from diamondo25/controllers.application.js
2.10 'duplicate route error'
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
import Ember from 'ember';
import { task, timeout, asyncComputed, emit } from 'ember-concurrency';
export default Ember.Controller.extend({
value: 23,
tweened: asyncComputed('value', function * (v) {
let targetValue = parseInt(v) || 0;
if (targetValue > 100) {
@acorncom
acorncom / controllers.application-error.js
Last active October 17, 2016 15:56 — forked from amk221/controllers.application.js
Basic loading / error templates
import Controller from 'ember-controller';
export default Controller.extend({
init() {
this._super(...arguments);
console.log('error controller initialised');
}
});
@acorncom
acorncom / router.js
Created October 6, 2016 15:36
New Twiddle
import Ember from 'ember';
import config from './config/environment';
const Router = Ember.Router.extend({
location: config.locationType,
rootURL: config.rootURL
});
Router.map(function() {
this.route('app', function() {
@acorncom
acorncom / triangle-workflow.md
Created December 22, 2015 22:37 — forked from anjohnson/triangle-workflow.md
Triangle workflows

Triangle Workflows

A triangle workflow involves an upstream project and a personal fork containing a development branch of the project. This configuration makes git pull merge changes from the upstream but git push send local commits to the personal fork.

To set up a project area

  • Fork the project on https://github.com/<project>

If you already cloned the upstream repository