-
Other
- http://emberjs.jsbin.com/rwjblue/251/edit?html,js,output - Opening a window and communicate with it.
- http://emberjs.jsbin.com/rwjblue/55/edit - Using liquid-fire animations in globals mode.
- http://emberjs.jsbin.com/rwjblue/151/edit?js,output - Modify computed dependent keys after initialization.
- http://emberjs.jsbin.com/rwjblue/299/edit?js,output - simplified version of ic-ajax
- http://emberjs.jsbin.com/rwjblue/337/edit?html,js,output - Detect if Mixin was mixed into a Class
-
POJO's
- http://emberjs.jsbin.com/rwjblue/253/edit?js,output - Defining computed properties on a POJO.
This file contains 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
sudo chown -R $USER /usr/local | |
sudo chown -R `whoami` ~/.npm |
This file contains 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
/// HOOKS | |
var noop = function () {}; | |
Renderer.prototype.willCreateElement = noop; // inBuffer | |
Renderer.prototype.createElement = noop; // renderToBuffer or createElement | |
Renderer.prototype.didCreateElement = noop; // hasElement | |
Renderer.prototype.willInsertElement = noop; // will place into DOM | |
Renderer.prototype.didInsertElement = noop; // inDOM // placed into DOM | |
Renderer.prototype.willRemoveElement = noop; // removed from DOM willDestroyElement currently paired with didInsertElement | |
Renderer.prototype.willDestroyElement = noop; // willClearRender (currently balanced with render) this is now paired with createElement |
This file contains 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
{{#list-block content=widgets}} | |
item value {{value}} | |
{{/list-block}} | |
to | |
<ul class='list-block'> | |
<li class='list-block__item'> | |
item value drawer-value | |
</li> | |
<li class='list-block__item'> | |
item value hot-drawer-value |
This file contains 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
git branch -m old_branch new_branch # Rename branch locally | |
git push origin :old_branch # Delete the old branch | |
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |
This file contains 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
for d in */; do | |
for f in $d*/; do | |
# echo $f | |
if [[ $f == *"4ktv_"* ]] | |
then | |
#COPY | |
# cp -r $f $d"xlarge/" | |
# echo $d"xlarge/" | |
#DELETE | |
rm -rf $f |
This file contains 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
Em.onLoad 'Ember.Application', (application)-> | |
application.initializer | |
name: 'OpenKey' | |
initialize: (container, app)-> | |
app.deferReadiness() | |
url = "#{app.CONFIG.API.host}/open-key" | |
Ember.$.ajax | |
url: url | |
method: "GET" | |
success: (result, textStatus, jqXHR) -> |
- see https://gist.github.com/machty/5723945 for the latest API (unlikely to change from now on)
- latest Ember build: https://machty.s3.amazonaws.com/ember/ember-async-routing-10.js
The Ember router is getting number of enhancements that will greatly enhance its power, reliability, predictability, and ability to handle asynchronous loading logic (so many abilities), particularly when used in conjunction with promises, though the API is friendly enough that a deep understanding of promises is not required for the simpler use cases.
This file contains 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
App.StorageService = Ember.Object.extend({ | |
persistence: window.localStorage, | |
namespace: 'ember-storage-service', | |
init: function() { | |
var callback = this._handleStorageEvent.bind(this); | |
$(window).on('storage', callback); | |
}, | |
OlderNewer