This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.0.0/handlebars.js"></script> | |
<script src="http://builds.emberjs.com.s3.amazonaws.com/tags/v1.0.0/ember.js"></script> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
</head> | |
<body> |
- create and alias/ symlink for the file, I use 'watcher.sh' in my home directory
- when you fire up a
gnome-terminal
- enter
~/watcher.sh
and leave that tab running in the background
- enter
- when you crash and reboot, and fire up a
gnome-terminal
- enter
~/watcher.sh restore
to restore all your windows and tabs that you previously had open, and it will cotninue watching automatically after that is done
- enter
Suppose you have an array of complex data that you wish you filter. The property to filter upon is bound to the value of a text input field.
By default, this means that every keystroke will result in the filter being computed and (that particular section of) the template re-rendered.
However, let's say we do not want this to happen, as we deem it to be too expensive. _.throttle
combined with Ember observes
using an property on a controller as an intermediary, makes this possible.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="description" content="[simple ember app that display foos using master-detail pattern & nested route & index]" /> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.0.0/handlebars.js"></script> | |
<script src="http://builds.emberjs.com.s3.amazonaws.com/tags/v1.3.2/ember.js"></script> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*globals console, process, __dirname */ | |
var modernizr = require('./lib/cli'); | |
var fs = require('fs'); | |
var args = process.argv.slice(2); | |
console.log('CLI arguments:', args); | |
if (args.length < 3) { | |
console.error('Expects three arguments: config, output, minifiedOutput'); |
Run the following commands:
gem install --pre compass sass-css-importer
npm install --save-dev broccoli-static-compiler broccoli-merge-trees broccoli-compass
(This assumes that you already have Ruby and NodeJs installed)
Then add the contents of snippet-add-broccoli-compass-to-ember-cli-app.js
to your Brocfile.js
,
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Mounts all known drives shared via virtual box | |
# configuration | |
MOUNT_POINT="${HOME}/media" | |
MOUNT_DIRS="foo bar" #replace with the ones you have configured for your virtual machine | |
USERID=$( id -u ) | |
GROUPID=$( id -g ) | |
for DIR in ${MOUNT_DIRS} ; do |