Skip to content

Instantly share code, notes, and snippets.

Avatar

Brian Runnells Dhaulagiri

View GitHub Profile
@Dhaulagiri
Dhaulagiri / application.controller.js
Created Jan 8, 2016
duplicate class names in 1.13
View application.controller.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle'
});
View controllers.application.js
import Ember from 'ember';
const { get, set } = Ember;
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
log(object, type) {
console.log(`the thing: ${object} from ${type}`);
},
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
myObject: Ember.computed(function() {
return {
items: {
foo: "bar"
}
};
@Dhaulagiri
Dhaulagiri / support.js
Created Nov 23, 2016
support signature
View support.js
javascript:(function()%7Bfunction callback()%7B(function(%24)%7Bvar jQuery%3D%24%3B%24('textarea#body').val(%24('textarea#body').val() %2B "%5Cn%5Cn Thanks%2C %5Cn Brian Runnells %5Cn Human Interface Team")%7D)(jQuery.noConflict(true))%7Dvar s%3Ddocument.createElement("script")%3Bs.src%3D"https%3A%2F%2Fajax.googleapis.com%2Fajax%2Flibs%2Fjquery%2F1.7.1%2Fjquery.min.js"%3Bif(s.addEventListener)%7Bs.addEventListener("load"%2Ccallback%2Cfalse)%7Delse if(s.readyState)%7Bs.onreadystatechange%3Dcallback%7Ddocument.body.appendChild(s)%3B%7D)()
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
displayValue: Ember.computed('value', function() {
return this.get('value');
}),
actions: {
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
init() {
this._super(...arguments)
const app = Ember.Object.create({
name:
'starting name'
});
this.set('app', app);
View index.html
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<h1 class="margin-top: 100px;" align="center">Ember.js vs. Dashboard</h1>
<h3 align="center">Release date vs. Dashboard adoption</h3>
<div id="timeline" style="height: 100%; width: 100%; text-align:center;"></div>
<script id="jsbin-javascript">
google.charts.load("current", {packages:["timeline"]});
google.charts.setOnLoadCallback(drawChart);
function drawChart() {
var container = document.getElementById('timeline');
var chart = new google.visualization.Timeline(container);
View esa.md

default ember-cli 2.12

  • dist/assets/vendor-82dd168f47b4b8274ccf6b8a008f928b.js: 770.45 KB (197.01 KB gzipped)

ember simple auth 1.1.0

  • dist/assets/vendor-e7a5afc936f4c4c7f5a7499cdd80c906.js: 796.11 KB (202.85 KB gzipped)

ember simple auth 1.2.0

  • dist/assets/vendor-37297f20b0776da51a8d76005a664900.js: 808.82 KB (206.68 KB gzipped)
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
foo: '5',
bar: '100',
baz: '0'
});
View components.my-component.js
import Ember from 'ember';
export default Ember.Component.extend({
router: Ember.inject.service(),
actions: {
goToRoute() {
this.get('router').transitionTo('bar');
}
}