Skip to content

Instantly share code, notes, and snippets.


Oli Griffiths oligriffiths

View GitHub Profile
View broccoli.js
class Plugin
shouldBuild() {
return this.inputs.hasChanges();
build() {
for (let input of this.inputs) {
oligriffiths / ember-ember
Last active Mar 2, 2018
Thoughts on removing ember data from ember
View ember-ember

The problem

Ember currently ships with ember data, and it is assumed that you will be using ember data within your application. The getting started guides also make the same assumption, and introduce ember data, before even mentioning that one can return a POJO or a promise that returns a POJO, for example an ajax request.

This contributes to the cognitive load of "learning ember" and I believe contributes substantially to the "steep learning curve" associated with learning ember. Ember data is indeed, a relatively complex product, with at least 4 core concepts to learn (models, store, adapters, serializers). To make matters worse, if your API isn't a nicely structure JSON-API, you're in for a hard time whilst you naviagte the ember data documentation to work out what to do. All of this is unnecessary to a new adopter to ember, and is likely to scare them off the framework entirely.


Whilst some colleagues of mine worke

oligriffiths /
Last active Jan 14, 2018
Ember.js addons we've been using at Tumblr
View controllers.application.js
import Ember from 'ember';
import RSVP from 'rsvp';
//Make object proxy for promise
const ObjectPromiseProxy = Ember.ObjectProxy.extend(Ember.PromiseProxyMixin);
* Returns a computed property that combines all dependent
* promises into an RSVP hash, which when resolves, calls
View Git Remove
# Remove remote references that have been deleted
git fetch -p
# Remove local branches that have been merged
git branch --merged | grep -v master | xargs git branch -d
View facebook-authenticator.php
namespace Nooku\Component\Overrides;
use Nooku\Library;
use Nooku\Component\Users;
class UsersDispatcherAuthenticatorFacebook extends Library\DispatcherAuthenticatorAbstract
* A redirect url
oligriffiths / cacheable.php
Last active Aug 29, 2015
A cachable model behavior for Nooku Platform
View cacheable.php
* User: Oli Griffiths
* Date: 06/03/15
* Time: 09:53
namespace Oligriffiths\Component\Foursquare;
use Nooku\Library;
View ember-self-defining-apps-adapter.js
* Custom data adapter
* Adapter delegates request methods to the entity resolver, rather than a regular ajax request.
* Add/edit/delete methods are suppressed for this implementation but could easily be enabled
module.exports = DS.Adapter.extend({
View Nooku request forwarding.php
a. Embedding the user ID as a query string variable seems like a bad idea. I assume you’re using that to set a model state when you do your browse page. Here is what I would do:
1) create a settings controller if you haven’t already
2) depending upon which actions you need the user id set for, I would either set it as a model state in the controller constructor if you need user id set for all actions:
oligriffiths / gist:5940720
Created Jul 6, 2013
Koowa default plugin
View gist:5940720
* @version $Id$
* @package Nooku_Plugins
* @subpackage Koowa
* @copyright Copyright (C) 2007 - 2012 Johan Janssens. All rights reserved.
* @license GNU GPLv3 <>
* @link