Skip to content

Instantly share code, notes, and snippets.

@felixrieseberg
felixrieseberg / gist:a120ce8c48be3904e971
Created October 1, 2014 16:58
Turning a template into a module
// 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 April 20, 2015 17:58
Successful Azure Ghost Deployment
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'

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() {
{
"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 July 26, 2016 00:47
Ember Cli (Pull #6098) Tests: As user, on WSL filesystem
> 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 July 26, 2016 00:59
Ember Cli (Pull #6098) Tests: As sudo, on WSL filesystem
> 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 July 26, 2016 00:59
Ember Cli (Pull #6098) Tests: As sudo, on WSL filesystem
> 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
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 July 26, 2016 01:18
WSL: sudo ember serve (witch watchman)
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)
@felixrieseberg
felixrieseberg / gist:46b1a71bfa1342c81ed759b310cec69c
Created July 26, 2016 01:24
WSL: ember serve --watcher=polling
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)