Skip to content

Instantly share code, notes, and snippets.

Avatar

Felix Rieseberg felixrieseberg

View GitHub Profile
@felixrieseberg
felixrieseberg / gist:a120ce8c48be3904e971
Created Oct 1, 2014
Turning a template into a module
View gist:a120ce8c48be3904e971
// Requires export of Express app object:
// var app = module.exports = express();
var app = require('app');
var templateToModule = function(template) {
this.template = template;
}
templateToModule.prototype.render = function(callback) {
app.render(this.template, function(error, html) {
@felixrieseberg
felixrieseberg / ghostazuredeploy.txt
Created Apr 20, 2015
Successful Azure Ghost Deployment
View ghostazuredeploy.txt
Command: "D:\home\site\deployments\tools\deploy.cmd"
Handling node.js deployment.
KuduSync.NET from: 'D:\home\site\repository' to: 'D:\home\site\wwwroot'
Deleting file: 'hostingstart.html'
Copying file: '.gitignore'
Copying file: 'azuredeploy.json'
Copying file: 'bower.json'
Copying file: 'config.example.js'
Copying file: 'config.js'
Copying file: 'Gruntfile.js'
View gist:d75b86f1c92f138131a3

On components and views, you run:

function () {
  ...
}.on('didInsertElement')

In other places, you can schedule a function to be called by the Ember Run loop:

Ember.run.scheduleOnce('afterRender', this, function() {
View gist:893978e5c99b43f708e8
{
"caret_extra_width": 1,
"caret_style": "phase",
"close_windows_when_empty": false,
"color_scheme": "Packages/User/SublimeLinter/predawn (SL).tmTheme",
"copy_with_empty_selection": false,
"drag_text": false,
"draw_minimap_border": true,
"enable_tab_scrolling": false,
"folder_exclude_patterns":
@felixrieseberg
felixrieseberg / gist:ae951d8a2e079fa83c37f1f878f347d6
Created Jul 26, 2016
Ember Cli (Pull #6098) Tests: As user, on WSL filesystem
View gist:ae951d8a2e079fa83c37f1f878f347d6
> ember-cli@2.7.0-beta.6 test-all:cover /home/feriese/Code-Native/ember-cli
> istanbul cover tests/runner.js all
info: Scanning for yuidoc.json file.
warn: Skipping node_modules directory while scanning for yuidoc.json
info: Loading package.json data from: /home/feriese/Code-Native/ember-cli/package.json
info: Loading yuidoc.json data from: /home/feriese/Code-Native/ember-cli/docs/yuidoc.json
@felixrieseberg
felixrieseberg / gist:be006826341c05fd685be232a867f6d5
Created Jul 26, 2016
Ember Cli (Pull #6098) Tests: As sudo, on WSL filesystem
View gist:be006826341c05fd685be232a867f6d5
> ember-cli@2.7.0-beta.6 test-all:cover /home/feriese/Code-Native/ember-cli
> istanbul cover tests/runner.js all
info: Scanning for yuidoc.json file.
warn: Skipping node_modules directory while scanning for yuidoc.json
info: Loading package.json data from: /home/feriese/Code-Native/ember-cli/package.json
info: Loading yuidoc.json data from: /home/feriese/Code-Native/ember-cli/docs/yuidoc.json
@felixrieseberg
felixrieseberg / gist:755a458dc5f0afecce090730be3d7887
Created Jul 26, 2016
Ember Cli (Pull #6098) Tests: As sudo, on WSL filesystem
View gist:755a458dc5f0afecce090730be3d7887
> ember-cli@2.7.0-beta.6 test-all:cover /home/feriese/Code-Native/ember-cli
> istanbul cover tests/runner.js all
info: Scanning for yuidoc.json file.
warn: Skipping node_modules directory while scanning for yuidoc.json
info: Loading package.json data from: /home/feriese/Code-Native/ember-cli/package.json
info: Loading yuidoc.json data from: /home/feriese/Code-Native/ember-cli/docs/yuidoc.json
View gist:4eae213d3c0b92e955dff8ee802c7704
feriese@FELIX-SURFACE ~/Code-Native/testapp (master) $ ember serve
Could not start watchman; falling back to NodeWatcher for file system events.
Visit http://ember-cli.com/user-guide/#watchman for more info.
Just getting started with Ember? Please visit http://localhost:4200/ember-getting-started to get going
File: /home/feriese/Code-Native/testapp/app
The Broccoli Plugin: [object Object] failed with:
Error: watch /home/feriese/Code-Native/testapp/app EPERM
at exports._errnoException (util.js:1007:11)
@felixrieseberg
felixrieseberg / gist:5a0da9c07db3acbe951766bf6f38b35e
Created Jul 26, 2016
WSL: sudo ember serve (witch watchman)
View gist:5a0da9c07db3acbe951766bf6f38b35e
Livereload server on http://localhost:49152
Serving on http://localhost:4200/
connect EPERM /usr/local/var/run/watchman/root-state/sock
Error: connect EPERM /usr/local/var/run/watchman/root-state/sock
at Object.exports._errnoException (util.js:1007:11)
at exports._exceptionWithHostPort (util.js:1030:20)
at PipeConnectWrap.afterConnect [as oncomplete] (net.js:1080:14)
The Broccoli Plugin: [ConfigReplace] failed with:
Error: EISDIR: illegal operation on a directory, read
at Error (native)
View gist:46b1a71bfa1342c81ed759b310cec69c
feriese@FELIX-SURFACE ~/Code-Native/testapp (master) $ sudo ember serve --watcher=polling
Just getting started with Ember? Please visit http://localhost:4200/ember-getting-started to get going
Livereload server on http://localhost:49152
Serving on http://localhost:4200/
The Broccoli Plugin: [ConfigReplace] failed with:
Error: EISDIR: illegal operation on a directory, read
at Error (native)
at Object.fs.readSync (fs.js:725:19)
You can’t perform that action at this time.