Skip to content

Instantly share code, notes, and snippets.

View ultimatemonty's full-sized avatar

Chris McCuller ultimatemonty

View GitHub Profile
@ultimatemonty
ultimatemonty / controllers.application.js
Last active March 17, 2017 13:33
CP with no dependent keys test
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
now: Ember.computed(function() {
return new Date();
}),
actions: {
updateNow() {
import Ember from 'ember';
export default Ember.Component.extend({
model: null,
parent: null,
init() {
this._super(...arguments);
if (this.get('parent')) {
this.get('parent').register(this);
// app/models/node.js
export default Model.extend({
sourceNodes: hasMany('node', { inverse: 'destinationNodes' }),
destinationNodes: hasMany('node', { inverse: 'sourceNodes' }),
destinationNodeOrder: attr('array') // custom transform, manually set in serializer
});
@ultimatemonty
ultimatemonty / question.txt
Created July 24, 2016 18:23
sugar pirate question
Right before your first Emberconf talk you blogged about your struggles with imposter syndrome. Since that first talk you've hit the bigtime within the Ember community - anytime you post something everyone is raving about it (and for good reason!). How has this popularity and praise affected your imposter syndrome?
@ultimatemonty
ultimatemonty / index.js
Created July 24, 2016 17:28
importing blueprints pre Ember 2.x
var Blueprint = require('ember-cli/lib/models/blueprint');
var blueprints = [ 'route', 'route-test', 'component', 'component-test' ].map(function(name) {
return Blueprint.lookup(name);
});
/*jshint node:true*/
module.exports = {
description: 'Generates a glimmer-component style route',
beforeInstall: function(options) {
@ultimatemonty
ultimatemonty / Requirements.md
Last active December 5, 2015 19:13
TODO App Ideas
  • combine the todo list with the calendar and notes
  • on a given day i can go back and see the todo list items i completed as well as any notes i made for that day and my todo list moves forward with me
  • so every day i see my up to date to do list
  • whenever i check something off the list it logs it as done on that day and removes it from my list
@ultimatemonty
ultimatemonty / application.controller.js
Last active November 24, 2015 14:42
Actions Testing
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle'
});
@ultimatemonty
ultimatemonty / application.controller.js
Last active September 9, 2015 13:38
SPIKE: Object Factory
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'SPIKE: Object Factory'
});
@ultimatemonty
ultimatemonty / AppHost.cs
Last active August 29, 2015 14:21
Custom Authentication
public override void Configure(Container container)
{
// other stuff omitted for brevity
// caching
container.Register<ICacheClient>(new MemoryCacheClient());
// Form based credentials authentication
this.Plugins.Add(new AuthFeature(() => new CustomAuthUserSession(),
new IAuthProvider[] {
// more providers can be added here as required