Skip to content

Instantly share code, notes, and snippets.

import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
import Ember from 'ember';
export default Ember.Controller.extend({
names: ['Stefan', 'Miguel', 'Tomster', 'Pluto']
});
@yininge
yininge / slate.js
Created May 10, 2018 17:04
slate config
// Configs
slate.configAll({
defaultToCurrentScreen: true,
secondsBetweenRepeat: 0.1,
checkDefaultsOnLoad: true,
orderScreensLeftToRight: true
});
var s0 = "0";
var s1 = "1";
@yininge
yininge / gist:dc3b500d1e47079786a5911cb6c708f1
Created April 13, 2018 04:47 — forked from arjunvenkat/gist:1115bc41bf395a162084
Seeding a Rails database with a CSV file

How to seed a Rails database with a CSV file

1. Setup

First, Create a folder inside of lib called seeds

Put your CSV file example.csv into the lib/seeds folder. In the example below, the file is called real_estate_transactions.csv

Make sure you've created a resource with the appropriate columns to match your seed data. The names don't have to match up.

@yininge
yininge / gist:0a6ef753576c8278f6bffc87699d1295
Created March 20, 2018 16:50
Ember conference 2019 Notes
TypeScript
* motivation: fewer undefined is not an object errors
* Define object
* type MyObject = { name :string; … }
* type (short hand), interface (can be extended), class (extends / implements) to create our own types
* Interface
* Extends the shape
* Class
* Extends get parents behavior & shape
* Implements validates that it matches the shape
import Ember from 'ember';
export default Ember.Component.extend({
changeValue(v){
get('changeValue')(v);
}
});