Skip to content

Instantly share code, notes, and snippets.

View thermokarst's full-sized avatar

Matthew Ryan Dillon thermokarst

View GitHub Profile
#!/usr/bin/env python
# ----------------------------------------------------------------------------
# Copyright (c) 2016--, QIIME 2 development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# ----------------------------------------------------------------------------
@thermokarst
thermokarst / controllers.application.js
Last active April 23, 2016 17:06
recheck json api
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
@thermokarst
thermokarst / adapters.application.js
Last active April 23, 2016 16:27
hyperlinked related fields
import Ember from 'ember';
const ERROR_MESSAGES = {
401: 'Unauthorized',
500: 'Internal Server Error'
};
export default DS.RESTAdapter.extend({
defaultSerializer: "DS/djangoREST",
addTrailingSlashes: true,
@thermokarst
thermokarst / adapters.application.js
Last active April 23, 2016 16:18
ready() hook sadness
import Ember from 'ember';
const ERROR_MESSAGES = {
401: 'Unauthorized',
500: 'Internal Server Error'
};
export default DS.RESTAdapter.extend({
defaultSerializer: "DS/djangoREST",
addTrailingSlashes: true,
import Ember from 'ember';
export default Ember.Route.extend({
beforeModel() {
this.store.push({
data: {
type: 'folder',
id: 2
}
});
import Ember from 'ember';
const { Controller, Object } = Ember;
const TestObject = Object.extend({
property1: 'abc',
property2: [1],
});
export default Controller.extend({