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';
}
import Component from '@glimmer/component';
import { action } from '@ember/object';
import { tracked } from '@glimmer/tracking';
export default class DropdownComponent extends Component {
@tracked feature = 'one';
defaultOptions = ['one', 'two', 'three'];
all = true;
### Keybase proof
I hereby claim:
* I am acorncom on github.
* I am acorncom (https://keybase.io/acorncom) on keybase.
* I have a public key ASAw5EJ_RKe1iAXtMwIDHMsqamo5Tkfzbr0fs1liOdytNgo
To claim this, I am signing this object:
@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 / components.message-switcher.js
Last active March 15, 2017 03:12
more loading states
import Ember from 'ember';
export default Ember.Component.extend({
counter: 0,
messages: [
'This is going to take a while, sorry about that ...',
'We\'re busy getting your info, shouldn\'t be much longer now ...',
'Hang in there, almost finished ...'
],
@acorncom
acorncom / components.desired.card-holder.js
Last active February 23, 2017 18:27
sidebar toggle setup
import Ember from 'ember';
export default Ember.Component.extend({
});
@acorncom
acorncom / components.message-switcher.js
Last active March 15, 2017 03:02
loading templates expanded
import Ember from 'ember';
export default Ember.Component.extend({
counter: 0,
messages: [
'This is going to take a while, sorry about that ...',
'We\'re busy getting your info, shouldn\'t be much longer now ...',
'Hang in there, almost finished ...'
],
@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() {