Skip to content

Instantly share code, notes, and snippets.

View AmilKey's full-sized avatar
🏠
Working from home

Ivan AmilKey

🏠
Working from home
View GitHub Profile
Capybara.register_driver :chrome do |app|
Capybara::Selenium::Driver.new(app, :browser => :chrome)
end
Capybara.default_driver = :chrome
import Ember from 'ember';
import DS from 'ember-data';
/**
* Returns true iff the number passed in is even
* @param {Number} x
* @return {Boolean}
*/
function isEven(x) {
return x % 2 == 0;
@AmilKey
AmilKey / circle.yml
Created June 17, 2016 07:22 — forked from citrus/circle.yml
circle.yml for building ember app with Circle CI
machine:
node:
version: 0.12.0
dependencies:
pre:
- export PATH=/usr/local/phantomjs-2.0.0/bin:$PATH
- npm config set spin false
- npm install -g npm@^2
- npm install -g bower
@AmilKey
AmilKey / gist:2163c94a09747bc76507b55f68fbd14f
Created June 10, 2016 11:31
generate the shim ember.js
https://ember-cli.com/user-guide/#standard-non-amd-asset
First, generate the shim:
ember generate vendor-shim moment
Next, provide the vendor asset path:
app.import('vendor/shims/moment.js');
Finally, use the package by adding the appropriate import statement:
{{my-component click=(action "foo")}}
@AmilKey
AmilKey / gist:fe4d2471b7b246a455afb2efe5048b60
Last active June 17, 2016 14:20
compare ember-cli versions
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
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/
@AmilKey
AmilKey / js-micro.js
Created May 29, 2016 19:32 — forked from yuval-a/js-micro.js
Javascript micro-optimizations
// 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
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
@AmilKey
AmilKey / best_practices.md
Created April 25, 2016 18:10 — forked from alanpeabody/best_practices.md
Ember Best Practices

Ember Best Practices

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.

Ember data

Ember data relationships

Routing