Skip to content

Instantly share code, notes, and snippets.

View Kerrick's full-sized avatar

Kerrick Long Kerrick

View GitHub Profile
@Kerrick
Kerrick / gotta-clone-them-all.rb
Created March 19, 2013 01:19
gotta-clone-them-all, to clone all the github repositories of a user
#!/usr/bin/env ruby
# gotta-clone-them-all, to clone all the github repositories of a user
# Copyright (C) 2013 Kerrick Long
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
@Kerrick
Kerrick / computed-property.coffee
Created March 21, 2014 14:58
Ember.js CoffeeScript Computed Properties
fullName: Ember.computed 'firstName', 'lastName', ->
"#{@get('firstName')} #{@get('lastName')}"
###
Tends to be less awkward than:
fullName: (->
"#{@get('firstName')} #{@get('lastName')}"
).property('firstName', 'lastName')
###
@Kerrick
Kerrick / gist:10741833
Created April 15, 2014 15:29
Keybase proof

Keybase proof

I hereby claim:

  • I am Kerrick on github.
  • I am kerrick (https://keybase.io/kerrick) on keybase.
  • I have a public key whose fingerprint is 2CA6 BC69 0DFF 54BF DA9B 4F49 08DD E043 06DF CD97

To claim this, I am signing this object:

@Kerrick
Kerrick / controllers.application.js
Created August 6, 2015 19:59
Array Computed without arrayComputed?
import Ember from 'ember';
const { computed, get, set } = Ember;
export default Ember.Controller.extend({
appName:'Ember Twiddle',
parts: computed('appName', {
get() {
return get(this, 'appName').split(' ');
},
@Kerrick
Kerrick / application.controller.js
Created March 23, 2016 18:27
Dirty Property Test Case
import Ember from 'ember';
export default Ember.Controller.extend({
});
@Kerrick
Kerrick / components.my-component.js
Last active April 25, 2016 21:07
Yielded Block Spacing Issues
import Ember from 'ember';
export default Ember.Component.extend({
tagName: ''
});
@Kerrick
Kerrick / components.show-hide-trigger.js
Created September 14, 2016 16:41
isVisible Changes `display` without removing from DOM
import Ember from 'ember';
export default Ember.Component.extend({
});
import Ember from 'ember';
const FooMixin = Ember.Mixin.create({
foo() {
alert('foo');
}
});
const obj = Ember.Object.extend(FooMixin).create();
@Kerrick
Kerrick / components.item-viewer.js
Last active December 15, 2016 23:08
Reduced Test Case - Reset State
import Ember from 'ember';
export default Ember.Component.extend({
value: false,
actions: {
toggle() {
this.toggleProperty('value');
}
}
});
@Kerrick
Kerrick / components.my-component.js
Created January 12, 2017 20:17
Adding Dynamic Class Names
import Ember from 'ember';
export default Ember.Component.extend({
classNames: ['gets-classes-added'],
actions: {
addClass() {
const newClass = Math.random().toString().slice(2);
this.get('classNames').addObject(newClass);
}
}