Skip to content

Instantly share code, notes, and snippets.

@piotrpalek
piotrpalek / components.did-render.js
Created October 11, 2018 21:54
ember-scrollable didRender issue
import Ember from 'ember';
export default Ember.Component.extend({
name: '',
renderCount: 0,
didRender() {
this.set('renderCount', this.renderCount++);
console.log(`did render!!! ${this.name}`);
}
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
model: {
id: 1
},
observe: Ember.observer('model.id', function() {
Debugger entered--Lisp error: (invalid-function with-helm-buffer)
with-helm-buffer(t)
helm--turn-on-linum-relative()
run-hooks(helm-after-initialize-hook)
helm-log-run-hook(helm-after-initialize-hook)
helm-initial-setup(nil)
helm-initialize(noresume nil nil (((nomark) (name . "Emacs Commands History") (candidates . #[0 "\304\302\300\305\303$\211\205\306\307\310\301\"\"\207" [commandp nil ("set-variable" "spacemacs/home" "helm-multi-swoop-all" "minibuffer-force-complete-and-exit" "minibuffer-force-complete" "evil-surround-region" "indent-according-to-mode" "evil-scroll-line-to-center" "ibuffer" "projectile-run-command-in-root" "projectile-run-eshell" "query-replace" "customize-set-variable" "make-variable-buffer-local" "indent-guide-global-mode" "indent-new-comment-line" "indent-relative-maybe" "indent-rigidly" "indent-to" "dtrt-indent-mode" "evil-indent" "replace-string" "evil-jump-backward" "avy-pop-mark" "configuration-layer/update-packages" "new-frame" "evil-scroll-page-down" "spacemacs/scro
@piotrpalek
piotrpalek / README.md
Last active October 21, 2017 11:47
Ember Twiddle Demo: Mirage with Ember Twiddle

Ember Twiddle Demo: Mirage with Ember Twiddle

Demo

This is a very trivial example of using mirage with Ember Twiddle.

import Ember from 'ember';
function latestProperty(dependentKeyA, dependentKeyB, latestWin = false) {
let aTimestamp, bTimestamp;
aTimestamp = bTimestamp = + new Date();
let aCache, bCache;
return Ember.computed(dependentKeyA, dependentKeyB, function() {
let currentA = Ember.get(this, dependentKeyA);
let currentB = Ember.get(this, dependentKeyB);
let timestamp = + new Date();
import Ember from 'ember';
export default Ember.Component.extend({
value: '',
collectedValues: [],
actions: {
keyUp(event) {
this.set('value', event.target.value);
// if enter
import Ember from 'ember';
export default Ember.Controller.extend({
store: Ember.inject.service(),
init() {
this._super(...arguments);
this.set('isLoading', true);
this.get('store').cachedStories(700).then((stories) => {
this.set('stories', stories);
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
@piotrpalek
piotrpalek / controllers.application.js
Created November 3, 2016 16:02
ember2.10beta bug
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
init() {
this._super(...arguments);
this.get('store').pushPayload('my-model', {
data: {
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});