In this guide we will cover two main cases:
- Ember specific library
- vendor library
The Ember library will assume that Ember has already ben loaded (higher in the loading order) and thus will assume it has access to the Ember API.
| // https://github.com/BrowserSync/browser-sync/issues/141 | |
| browserSync({ | |
| notify: { | |
| styles: [ | |
| 'display: none; ', | |
| 'padding: 6px 15px 3px;', | |
| 'position: fixed;', | |
| 'font-size: 0.8em;', | |
| 'z-index: 9999;', | |
| 'left: 0px;', |
| # Im using this at ~/.bashrc | |
| # | |
| # You could also put it in a external file "~/.bash_webdev-dependencies" and import it to ".bashrc" with: | |
| #. ~/.bash_webdev-dependencies | |
| # | |
| # I guess you could also make .sh and soft linkit to somewhere in the $PATH, but this seems simpler and cleaner | |
| ################ | |
| ##### npm ##### | |
| alias npmlistshort='npm list --depth=0' |
| var EmberApp = require('ember-cli/lib/broccoli/ember-app'); | |
| var pickFiles = require('broccoli-static-compiler'); | |
| var mergeTrees = require('broccoli-merge-trees'); | |
| var vulcanize = require('broccoli-vulcanize'); | |
| var app = new EmberApp(); | |
| var polymerVulcanize = vulcanize('app', { | |
| input: 'elements.html', | |
| output: 'assets/vulcanized.html', |
| function dashToCamelCase( myStr ) { | |
| return myStr.replace(/-([a-z])/g, function (g) { return g[1].toUpperCase(); }); | |
| } | |
| var myStr = dashToCamelCase( 'this-string' ); | |
| alert( myStr ); // => thisString |
| App.LibraryRoute = App.ApplicationRoute.extend({ | |
| activate: function () { | |
| //no longer enter | |
| this._super(); | |
| only called once on entering a route. | |
| }, | |
| beforeModel: function () { | |
| // any state you want in place before the model is initialized, this is called before any model promises are resolved | |
| // also could be used to conditionally prevent access to a route by throwing transition.abort |
| <?php | |
| /** | |
| * Instructions: | |
| * | |
| * 1. Put this into the document root of your Kirby site | |
| * 2. Make sure to setup the base url for your site correctly | |
| * 3. Run this script with `php statify.php` or open it in your browser | |
| * 4. Upload all files and folders from static to your server | |
| * 5. Test your site |
| # Thanks to this post: | |
| # http://blog.ikato.com/post/15675823000/how-to-install-consolas-font-on-mac-os-x | |
| $ brew install cabextract | |
| $ cd ~/Downloads | |
| $ mkdir consolas | |
| $ cd consolas | |
| $ curl -O http://download.microsoft.com/download/f/5/a/f5a3df76-d856-4a61-a6bd-722f52a5be26/PowerPointViewer.exe | |
| $ cabextract PowerPointViewer.exe | |
| $ cabextract ppviewer.cab |
| #!/usr/bin/env bash | |
| # fresh-chrome | |
| # | |
| # Use this script on OS X to launch a new instance of Google Chrome | |
| # with its own empty cache, cookies, and user configuration. | |
| # | |
| # The first time you run this script, it will launch a new Google | |
| # Chrome instance with a permanent user-data directory, which you can | |
| # customize below. Perform any initial setup you want to keep on every |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000