Skip to content

Instantly share code, notes, and snippets.

Sean Clark optikalefx

Block or report user

Report or block optikalefx

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View components.my-component.js
import Ember from 'ember';
import Component from '@ember/component';
export default class MyComponent extends Component {
foo = "bar";
}
@optikalefx
optikalefx / controllers.application.js
Last active May 1, 2019
depend on input in array
View controllers.application.js
import Ember from 'ember';
import { computed } from '@ember/object';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
people: [
Ember.Object.create({ name: 'foo', qty: 2 }),
Ember.Object.create({ name: 'bar', qty: 3})
],
newList: computed('people.@each.name', function() {
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
View components.ember-tooltip.js
import EmberTooltipComponent from 'ember-tooltips/components/ember-tooltip';
export default EmberTooltipComponent.extend({
effect: 'fade',
side: 'bottom',
});
View components.x-details.js
import Ember from 'ember';
export default Ember.Component.extend({
tagName: 'details',
attributeBindings: ['open'],
actions: {
close() {
console.log('close');
this.set('open', false);
}
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
selectedItem: { name: 'sean', age: 24},
valueList: [
{ name: 'joe', age: 24},
{ name: 'john', age: 30},
{ name: 'steve', age: 44}
]
View education.js
const puppeteer = require('puppeteer');
const fs = require('fs-extra');
const timeout = function (ms) {
return new Promise(resolve => setTimeout(resolve, ms));
};
const LoopFunction = async function (page) {
try {
const sections = await page.$$('#listaCursoSuperior .item-graduacao');
View qb2.js
const puppeteer = require('puppeteer');
const fs = require('fs-extra');
const timeout = async function(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
};
const loopFunction = async function(page, pageNumber) {
console.log('back in loop fn', pageNumber);
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
View components.wb-checkbox-list.js
import Ember from 'ember';
export default Ember.Component.extend({
selectedItems: [],
items: [],
actions: {
handleChange(item, event) {
if (event.target.checked) {
this.get('selectedItems').push(item);
}
You can’t perform that action at this time.