This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
counter: Ember.computed({ | |
get(){ | |
return 0; | |
}, | |
set(k,v){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fieldList = [ | |
{ label: 'Foo Fields', fields: [{name: 'foo', selected: false}] }, | |
{ label: 'Bar Fields', fields: [{name: 'bar', selected: true}] } | |
] | |
fields: Ember.computed('[email protected]', function() { | |
return this.get("fieldList").mapBy("fields"); | |
}), | |
enabledFields: Ember.computed("fields", "[email protected]", function(){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
class ItemRating extends HTMLElement { | |
createdCallback () { | |
this.insertAdjacentHTML('afterbegin', ` | |
<a data-rating="1">★</a> | |
<a data-rating="2">★</a> | |
<a data-rating="3">★</a> | |
<a data-rating="4">★</a> | |
<a data-rating="5">★</a> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
tagName: 'th', | |
downArrow: '▼', | |
upArrow: '▲', | |
actions: { | |
sortBy(model, sortProperty, order) { | |
// Remove all selected classes from all the header links |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd /tmp | |
# Faster require: | |
# https://gist.github.com/1008945 | |
curl -O https://raw.github.com/gist/1008945/4edd1e1dcc1f0db52d4816843a9d1e6b60661122/ruby-1.9.2p290.patch | |
# GC-tuning: | |
# https://gist.github.com/856296 | |
curl -O https://raw.github.com/gist/856296/a19ac26fe7412ef398bd9f57e61f06fef1f186fe/patch-1.9.2-gc.patch |