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 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
| https://github.com/emberjs/data/issues/772 | |
| I think there is a kind of Conccurent modification, you're walking through the list | |
| and delete one element at the same time. I think the run.once defers the deletion after the loop has been made. | |
| To avoid it, I think you could iterate over a copy instead of the content. Something like | |
| @get("content").toArray().forEach(article) -> | |
| article.deleteRecord() | |
| forEach uses Array.prototype.forEach which is basically: |
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
| amilkey [7:35 PM] | |
| @ everyone what you use for forms? | |
| i looked at ember addons that work with Ember 2.0 and didn't find anything | |
| pixelhandler [7:36 PM] | |
| @amilkey: I use a component for the form and have status for editing and previewing and sometimes use the buffered proxy addon to delay changes to the model | |
| pixelhandler [7:39 PM] | |
| and use a flag for new too, when previewing I make the inputs disabled |
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
| http://jasonrudolph.com/blog/2009/02/25/git-tip-how-to-merge-specific-files-from-another-branch/ | |
| $ git branch | |
| * master | |
| twitter_integration | |
| $ git checkout twitter_integration app/models/avatar.rb db/migrate/20090223104419_create_avatars.rb test/unit/models/avatar_test.rb test/functional/models/avatar_test.rb | |
| $ git status | |
| # On branch master | |
| # Changes to be committed: | |
| # (use "git reset HEAD <file>..." to unstage) |
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
| http://emberjs.com/api/data/classes/DS.RootState.html | |
| * root | |
| * deleted | |
| * saved | |
| * uncommitted | |
| * inFlight | |
| * empty | |
| * loaded | |
| * created |
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
| // from https://www.youtube.com/watch?v=vvZEddrClAQ&feature=youtu.be | |
| export default Ember.Component.extend({ | |
| draw(){ | |
| if (this._state !== 'inDOM') return; | |
| let data = this.get('data'); | |
| // do d3 stuff | |
| }, |
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
| App.StorageService = Ember.Object.extend({ | |
| persistence: window.localStorage, | |
| namespace: 'ember-storage-service', | |
| init: function() { | |
| var callback = this._handleStorageEvent.bind(this); | |
| $(window).on('storage', callback); | |
| }, | |
- 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
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
| 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) -> |
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
| 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 |