fetch pull request locally:
git fetch upstream refs/pull/{number}/head:{local_branch}
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
| `JSONSerializer` will normalize the JSON payload to the JSON API format that the | |
| Ember Data store expects. | |
| You can customize how JSONSerializer processes its payload by passing options in | |
| the `attrs` hash or by subclassing the `JSONSerializer` and overriding hooks: | |
| - To customize how a single record is normalized, use the `normalize` hook. | |
| - To customize how `JSONSerializer` normalizes the whole server response, use the | |
| `normalizeResponse` hook. | |
| - To customize how `JSONSerializer` normalizes a specific response from the server, | |
| use one of the many specific `normalizeResponse` hooks. | |
| - To customize how `JSONSerializer` normalizes your id, attributes or relationships, |
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://stevenbenner.com/2010/03/javascript-regex-trick-parse-a-query-string-into-an-object/ | |
| // JavaScript regex trick: Parse a query string into an object | |
| var queryString = {}; | |
| anchor.href.replace( | |
| new RegExp("([^?=&]+)(=([^&]*))?", "g"), | |
| function($0, $1, $2, $3) { queryString[$1] = $3; } | |
| ); | |
| // Usage |
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
| The problem is that steps.[].stepStatus is not a valid dependent key anymore. You should replace it by steps.@each.stepStatus. | |
| Here is a summary of valid and invalid dependent keys in current Ember versions: | |
| array - this observes if the array reference itself changes, e.g replacing the entire array with another value or array such as that oldValue !== newValue. | |
| array.[] - this observes both when the array itself changes (above) and when the array length changes (functionally equivalent of array.length) | |
| array.@each.property - observes both cases above and when property of some of the array's items change | |
| array.@each.{prop,anotherProp} - you can also observe multiple properties while specifying only one key. This expands to array.@each.prop and array.@each.anotherProp. | |
| array.@each - isn't valid anymore, no trailing @each. Use .[] instead. | |
| array.@each.property.property - Also not valid. Note that @each only works one level deep. You cannot use nested forms like todos.@each.owner.name or todos.@each.owner.@each |
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
| You can reset your branch to the state it was in just before the merge if you find the commit it was on then. | |
| One way is to use git reflog, it will list all the HEADs you've had. | |
| I find that git reflog --relative-date is very useful as it shows how long ago each change happend. | |
| Once you find that commit just do a git reset --hard <commit id> and your branch will be as it was before. |
Some thoughts and ideas on best practices building Ember apps after 2 years building and maintaining 6+ apps. This is less about the obvious best practices, like use ember-cli, and more along the lines of when to use what technique. As with every best practice there are exceptions to every rule.
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 simple charts https://github.com/aomran/ember-cli-chart | |
| for more complex charts https://github.com/ahmadsoe/ember-highcharts | |
| for custom charts simply d3 |
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
| // Array literal (= []) is faster than Array constructor (new Array()) | |
| // http://jsperf.com/new-array-vs-literal/15 | |
| var array = []; | |
| // Object literal (={}) is faster than Object constructor (new Object()) | |
| // http://jsperf.com/new-array-vs-literal/26 | |
| var obj = {}; | |
| // property === undefined is faster than hasOwnProperty(property) | |
| // http://jsperf.com/hasownproperty-vs-in-vs-undefined/17 |
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://miguelcamba.com/blog/2016/01/24/ember-closure-actions-in-depth/ | |
| http://miguelcamba.com/blog/2016/04/13/tricks-for-build-composable-components-part-1/ | |
| https://dockyard.com/blog/categories/ember | |
| http://frontside.io/blog/ |
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/ember-cli/ember-addon-output/compare/v2.3.0...v2.5.0 | |
| https://github.com/ember-cli/ember-new-output/compare/v2.3.0...v2.5.0 |