Ember Hooks:
didTransition
Fire on route change /ABC -> /XYZ
and model change /ABC/1 -> /ABC/2
Ember.Router.reopen({
didTransition: function() {
this._super();
//do stuff
}
var gulp = require('gulp'), | |
gutil = require('gulp-util'), | |
sass = require('gulp-ruby-sass'), | |
autoprefixer = require('gulp-autoprefixer'), | |
minifycss = require('gulp-minify-css'), | |
jshint = require('gulp-jshint'), | |
uglify = require('gulp-uglify'), | |
rename = require('gulp-rename'), | |
clean = require('gulp-clean'), | |
concat = require('gulp-concat'), |
Ember Hooks:
didTransition
Fire on route change /ABC -> /XYZ
and model change /ABC/1 -> /ABC/2
Ember.Router.reopen({
didTransition: function() {
this._super();
//do stuff
}
/** | |
Ember Longpolling | |
Periodically poll to update posts with latest comments | |
*/ | |
//Create Pollster Object | |
App.Pollster = Ember.Object.extend({ | |
start: function() { | |
this.timer = setInterval(this.onPoll.bind(this), POLL_INTERVAL); | |
}, |
moduleForComponent('my-component', 'description', { | |
setup: function() { ... }, | |
teardown: function() { ... } | |
}); |
@keyframes domChanged { from { background: yellow; } } | |
@-webkit-keyframes domChanged { from { background: yellow; } } | |
.ember-view { animation: domChanged 1s; -webkit-animation: domChanged 1s; } |
I hereby claim:
To claim this, I am signing this object:
function toArray(args) { | |
return [].slice.call(args); | |
} | |
function sub_curry(fn /*, variable number of args */) { | |
var args = [].slice.call(arguments, 1); | |
return function () { | |
return fn.apply(this, args.concat(toArray(arguments))); | |
}; | |
} |
/** | |
Placeholder - Contains all static mixin name value pairs for a particular mixin | |
*/ | |
%box { | |
border: 1px solid; | |
padding: 1em; | |
margin: 1em; | |
} | |
/** |
# Convert the following liquid tags into output wrapped with <code class="inline-code"> ... </code> | |
# 1. {% i %} var foo="bar"; {% ei %} | |
# 2. {% inline %} var foo="bar"; {% endinline %} | |
module Jekyll | |
class SyntaxHighlightInlineTag < Liquid::Tag | |
def render(context) | |
'<code class="inline-code">' | |
end | |
end |
/** | |
Intl.DateTimeFormat().resolvedOptions() | |
Object {locale: "en-US", numberingSystem: "latn", calendar: "gregory", timeZone: "America/New_York", year: "numeric"…} | |
calendar: "gregory" | |
day: "numeric" | |
locale: "en-US" | |
month: "numeric" | |
numberingSystem: "latn" | |
timeZone: "America/New_York" |