Skip to content

Instantly share code, notes, and snippets.

🐹
#TomsterOnTour

Dawid Pośliński PoslinskiNet

🐹
#TomsterOnTour
Block or report user

Report or block PoslinskiNet

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 controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
actions: {
add() {
const { title, calories } = this;
this.db.recipes.add({ title, calories: parseInt(calories) }).then(() => {
this.db.table("recipes")
.orderBy("calories")
View controllers.application.js
import Ember from 'ember';
import { computed } from '@ember/object';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
label: '',
hashCode(str) {
let hash = 0;
for (let i = 0; i < str.length; i++) {
View controllers.application.js
import Ember from 'ember';
import { computed } from '@ember/object';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
test: computed('{bla,la}', function() {
return `${this.bla},${this.la}`;
}),
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
});
View components.github-user-search.js
import Ember from 'ember';
import { task, timeout } from 'ember-concurrency';
import { isBlank } from '@ember/utils';
const DEBOUNCE_MS = 250;
const API_URL = 'https://api.github.com/search/users?q=';
export default Ember.Component.extend({
searchUsers: task(function * (term) {
if (isBlank(term)) { return []; }
@PoslinskiNet
PoslinskiNet / components.navigation-bar.js
Created Sep 23, 2018
#30DaysOfEmber - Computed Properties Demo
View components.navigation-bar.js
// app/components/navigation-bar/component.js
import Component from '@ember/component';
import { computed } from '@ember/object';
export default Component.extend({
counter: 0,
clickCounterDecorated: computed('counter', function() {
return `Counter: ${this.counter}`;
}),
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
value: `<div>
<p><span style="font-weight: bold;">Type: </span> exploration, adventure</p>
<br>
<p><span style="font-weight: bold;">Audio: </span> English</p>
</div>`,
pellOptions: {
@PoslinskiNet
PoslinskiNet / Broccoli analyzer.MD
Last active Jun 29, 2018
Analyze your ember app vendor file
View Broccoli analyzer.MD
  • npm install -g broccoli-concat-analyser
  • CONCAT_STATS=true ember s -e production
  • kill the server
  • broccoli-concat-analyser ./concat-stats-for

IMAGE

You can’t perform that action at this time.