Skip to content

Instantly share code, notes, and snippets.

.search-form {
margin-bottom: 40px;
}
button {
margin-left: 10px;
color: #fff;
background-color: #009b25;
border-radius: 4px;
padding: 2px 5px;
.search-form {
margin-bottom: 40px;
}
button {
margin-left: 10px;
color: #fff;
background-color: #009b25;
border-radius: 4px;
padding: 2px 5px;
@welzie
welzie / script.js
Last active May 2, 2018 21:09
Group by location using Map
//Run this in terminal via: $ node script.js
var features = [
{location: "mexico", dataField: "yearly cases", value: 15},
{location: "mexico", dataField: "monthly cases", value: 6},
{location: "mexico", dataField: "weekly cases", value: 2},
{location: "cuba", dataField: "yearly cases", value: 89},
{location: "cuba", dataField: "monthly cases", value: 56},
{location: "cuba", dataField: "weekly cases", value: 33},
{location: "zomba", dataField: "cases", value: 11},
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
things: [],
actions: {
addThing() {
this.get('things').pushObject(this.get('thing'));
}
import Ember from 'ember';
export default Ember.Component.extend({
count: 0,
didUpdateAttrs() {
this._super(...arguments);
window.console.log('<inner-comp> didUpdateAttrs', ...arguments);
},
didReceiveAttrs() {
@welzie
welzie / controllers.application.js
Created January 27, 2017 23:09
prevent input click propogation
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
actions: {
alert() {
window.alert('clicked me');
}
}