View components.slow-word.js
import Ember from 'ember';
export default Ember.Component.extend({
isVisible: false,
didInsertElement() {
Ember.run.later(() => {
this.set('isVisible', true);
}, 3000);
}
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
queryParams: ['sort'],
sort: "",
sortedUsers: Ember.computed.sort('model', 'sortDefinition'),
sortDefinition: Ember.computed('sort', function() {
return [ this.get('sort') ];
}),
View application.controller.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
View application.controller.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle',
actions: {
authenticate(name, password) {
alert(`${name} / ${password}`);
}
}
View application.controller.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle'
});
View routes.application.js
import Ember from 'ember';
export default Ember.Route.extend({
model: function() {
return Ember.A([
{ title: 'hello' },
{ title: 'world' }
]);
}
});
View gist:4e899670027062cefa2a
# BEGIN WordPress
RewriteRule ^index\.php$ - [L]
# uploaded files
RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule . index.php [L]
# END WordPress
View pre-commit
#!/bin/sh
# stash unstaged changes, run build task, stage release updates and restore stashed files
NAME=$(git branch | grep '*' | sed 's/* //')
# don't run on rebase
if [ $NAME != '(no branch)' ]
then
git stash -q --keep-index
grunt
View post-merge
#!/bin/sh
# run npm and bower after every pull
npm install
grunt exec:components
View .vimrc
let whitespace_blacklist = ['markdown']
autocmd BufWritePre * if index(whitespace_blacklist, &ft) < 0 | :%s/\s\+$//e