Skip to content

Instantly share code, notes, and snippets.

Goals

  1. Incentivize capital efficiency by funded companies
  2. Ongoing connection between dilution and capital needs
  3. Give startups the flexibility they need, knowing that capital is available
  4. Keep as much capital activated as possible
  5. Allow investor liquid capital to be "working" for the investor all the time
  6. Better alignment of companies' incentives with providing value

Basic Structure

export default () => {
let foo = [1,2,3]
let output = foo.map( f => `.rule-${f}: { border-width:${f}px;});
return output;
}
/** Result
* [".rule-1: { border-width: 1px };",
* ".rule-2: { border-width: 2px };"
* ".rule-3: { border-width: 1px };"]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
@averydev
averydev / route.js
Created December 24, 2017 19:26
Async Or Swim: Cancel Abandoned Model Calls
commentsTask: task(function *(){
let blog = yield this.modelFor('blog').blogTask;
let comments = yield blog.get('comments');
return comments;
}).cancelOn('deactivate')
@averydev
averydev / route.js
Last active December 27, 2017 04:54
Async of Swim: Dynamic Segments.
//In your route
import Route from '@ember/routing/route';
import { task } from 'ember-concurrency';
export default Route.extend({
model: function (params){
return {
blog: this.get('blogTask').perform(params.blog_id)};
},
blog: task(function *(blogId){
let blog = yield this.get('store').findRecord('blog', blogId );
@averydev
averydev / route.js
Last active December 29, 2017 20:50
Async of Swim: Nested Routes. Replace route with Ember Concurrency Task
// routes/blog/comments.js
model: function (params){
return {
comments: this.get('commentsTask').perform()
};
},
commentsTask: task(function *(){
let blog = yield this.modelFor('blog').blogTask;
let comments = yield blog.get('comments');
return comments;
@averydev
averydev / route.js
Last active December 29, 2017 20:48
Async of Swim: basic case. Replace route with Ember Concurrency Task
// In your route...
import Route from '@ember/routing/route';
import { task } from 'ember-concurrency';
export default Route.extend({
model: function (){
return {
blog: this.get('blogTask').perform()
};
},
blogTask: task(function *(){
@averydev
averydev / controllers.application.js
Last active November 22, 2017 17:16
Ember Concurrency Task Model / Nested Routes
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Concurrency Decendants'
});
import Ember from 'ember';
export default Ember.Component.extend({
tagName: 'button',
click(evt) {
console.log('x-button click', evt); // will be torn down
this.sendAction();
}
});