Skip to content

Instantly share code, notes, and snippets.

View raytiley's full-sized avatar

Ray Tiley raytiley

View GitHub Profile
import Ember from 'ember';
export default Ember.Component.extend({
anInt: 10,
didInsertElement() {
this._super(...arguments);
this.set('_cancel', Ember.run.later(this, 'updateObj', 1000));
},
willDestroyElement() {
this._super(...arguments);
var FastBootServer = require('ember-fastboot-server');
var express = require('express');
var server = new FastBootServer({
distPath: '../fastboot-dist'
});
var app = express();
app.get('/*', server.middleware());
import Ember from 'ember';
let called = 0;
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
changingProp: 5,
notChangingCp: Ember.computed('changingProp', function() {
let prop = this.get('changingProp');
// Simulate calc that doesn't end up changing.
return 10;
}),

Ember's guides are pretty confusing on the loading substates. From the guides it seems that a transition will look up the route heiarchey until it finds a loading.hbs template. And display that. The caveat here is that it will only look up as high in the route heirachy as the root of the transition. This means that on initial load it will look up to the application loading template, but if your transition inbetween leaf routes, like say from edit bulletin to manage bulletins you won't find the application loading template, it will only search up on level to zones.

So its simple enough to add a loading template at every level, problem is it looks jank as hell since if you have multiple loading templates in a route transition, the animation will restart as each level resolves.

To work around this I removed the loading template and instead implemented the loading action in the application route. When this action is hit we set a timer via Ember.run.later to switch out the outlet with a loading animati

import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
[email protected] node_modules\ember-cli-inject-live-reload
[email protected] node_modules\ember-disable-proxy-controllers
[email protected] node_modules\ember-export-application-global
[email protected] node_modules\trms-notifications
[email protected] node_modules\symlink-or-copy
GööGöÇGöÇ [email protected]
gpioPort = CreateObject("roControlPort", "BrightSign")
print "About to Setup GIPO"
if gpioPort <> invalid then
print "GPIO VALID"
stop
gpioPort.SetPort(m.player.msgPort)
for i=0 to 8 step 1
result = gpioPort.EnableInput(i)
if result then
print "Successfully listining on pin " + strI(i)
Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. All rights reserved.
C:\WINDOWS\system32>cd ../code
The system cannot find the path specified.
C:\WINDOWS\system32>e:
E:\>cd code
@raytiley
raytiley / components.ssl-config.js
Last active January 25, 2020 22:00
Designer Homework
import Ember from 'ember';
export default Ember.Component.extend({
sslEnabled: false
});
@raytiley
raytiley / override-payload.json
Created February 15, 2020 14:17
Cablecast Force Matrix Automation Override Payloads
{
"forceEvents": [
{
"automationOverride": {
"output": "1",
"action": "Override",
"override": true,
"device": null
}
}