Skip to content

Instantly share code, notes, and snippets.

View robbiespeed's full-sized avatar

Robbie Speed robbiespeed

  • NS, Canada
  • 12:36 (UTC -04:00)
View GitHub Profile
import Ember from 'ember';
const { computed } = Ember;
export default Ember.Controller.extend({
appName:'Ember Twiddle',
thing: computed(function () {
let thing = this.set('appName', 'Ember');
return thing;
@robbiespeed
robbiespeed / application.controller.js
Created March 21, 2016 19:50
Async Service Tests
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
queryParams: [
{ perPage: 'per_page'}
],
perPage: 5
});
import Ember from 'ember';
export default Ember.Controller.extend({
queryParams: [{
testParam: 'test',
}],
appName: 'Ember Twiddle',
testParam: 'womp'
});
@robbiespeed
robbiespeed / model-dirtyRelationships.js
Created August 12, 2016 17:31
Ember-Data dirtyRelationships
import Ember from 'ember';
import Model from 'ember-data/model';
const { computed } = Ember;
function checkDirtyRelationships () {
const dirtyRelationships = this.get('_dirtyRelationships');
let anyDirty = false;
this.eachRelationship((key, descriptor) => {
import Ember from 'ember';
const { get, computed, run, isNone } = Ember;
export default Ember.Component.extend({
tagName: 'input',
attributeBindings: [
'type',
// '_value:value',
],
import Ember from 'ember';
const { get, set, computed } = Ember;
export default Ember.Controller.extend({
isButtonOn: false,
// This toggle will run when the button is pressed, it should toggle the isButtonOn property
// which should trigger the value of text to recompute
// -- begin edit area
toggle () {

Keybase proof

I hereby claim:

  • I am robbiespeed on github.
  • I am robbiespeed (https://keybase.io/robbiespeed) on keybase.
  • I have a public key ASAIL_zrUy2r__CtTsV6YsZ3cKfxH05lNKpiEe3qlAimYAo

To claim this, I am signing this object:

@robbiespeed
robbiespeed / example.ts
Last active October 15, 2024 16:16
Reactive primitive in the form of Emitters
declare global {
interface SymbolConstructor {
/**
* Similar to Symbol.iterator it is used to lookup the emitter of any Emittable
*/
readonly emitter: unique symbol;
}
/**
* Reactive primitive used for propagating messages through graph connections
@robbiespeed
robbiespeed / getSet.js
Last active October 25, 2023 23:46
JS Benches
import { bench, run } from 'mitata';
// This is a benchmark of the performance impact of using private properties.
const nCount = 1000;
const iCount = 1000;
class FooN {
#state = 1;
#inc = 13;