Skip to content

Instantly share code, notes, and snippets.

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

DekkoSecure 2 AmilKey

🏠
Working from home
View GitHub Profile
{{my-component click=(action "foo")}}
@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:
@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
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;
Capybara.register_driver :chrome do |app|
Capybara::Selenium::Driver.new(app, :browser => :chrome)
end
Capybara.default_driver = :chrome
@AmilKey
AmilKey / save
Created September 14, 2016 11:30
save relanships
https://guides.emberjs.com/v2.7.0/models/relationships/
```
let blogPost = this.get('store').peekRecord('blog-post', 1);
let comment = this.get('store').createRecord('comment', {
});
blogPost.get('comments').pushObject(comment);
comment.save().then(function () {
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
{
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
"file_exclude_patterns":
[
".DS_Store",
"._*"
],
"folder_exclude_patterns":
[
".svn",
<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css">
#outlook a { padding: 0; }
.ReadMsgBody { width: 100%; }
.ExternalClass { width: 100%; }
.ExternalClass * { line-height:100%; }
<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css">
#outlook a { padding: 0; }
.ReadMsgBody { width: 100%; }
.ExternalClass { width: 100%; }
.ExternalClass * { line-height:100%; }