Skip to content

Instantly share code, notes, and snippets.

View mikeu's full-sized avatar

Michael Underwood mikeu

  • Calgary, Alberta, Canada
View GitHub Profile
import Vue from 'vue'
import {DataStore, Record} from 'js-data'
// Define a base class that enables property-level vue reactivity and, optionally does so at the relationship-level.
export class VueReactiveRecord extends Record {
constructor (...args) {
// Among other things, this will apply js-data schema if configured to do so; be sure to do `track: true`.
super(...args);
@mikeu
mikeu / controllers.application.js
Last active October 18, 2017 20:35
Pagination Links demo changing last page
import Ember from 'ember';
export default Ember.Controller.extend({
currentPage: 1,
filteredLastPage: 8,
actions: {
@mikeu
mikeu / controllers.application.js
Last active October 5, 2017 14:51
ember-changeset-validations custom relative validation
import Ember from 'ember';
import validateLessThan from '../validators/validateLessThanAttr';
export default Ember.Controller.extend({
pairValidations: {
smaller: validateLessThan('larger'),
},
});
@mikeu
mikeu / controllers.application.js
Last active May 11, 2017 20:24 — forked from samselikoff/controllers.application.js
Mirage 0.3 - Many to Many, with factories
import Ember from 'ember';
export default Ember.Controller.extend({
db: Ember.computed('refreshDb', function() {
let dump = window.server.schema.db.dump();
return JSON.stringify(dump, null, 2);
}),
@mikeu
mikeu / gist:a76fb3a2a616095cee30
Created October 25, 2015 20:22
OneName verification
Verifying that +munderwood is my blockchain ID. https://onename.com/munderwood

Keybase proof

I hereby claim:

  • I am mikeu on github.
  • I am munderwood (https://keybase.io/munderwood) on keybase.
  • I have a public key whose fingerprint is 93C8 B029 6CA7 0968 E578 58CF 1456 6BA0 185F B753

To claim this, I am signing this object: