function foo(paths) {
return <svg>{paths}</svg>;
}
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
test('creates a local creation time property when saving', function () { | |
expect(1); | |
var now = new Date().getTime(), | |
clock = sinon.useFakeTimers(now), | |
model = App.Model.create(), | |
promise = Em.RSVP.resolve(), | |
superStub = sinon.stub(model, '_super').returns(promise); | |
model.save().then(function () { |
@mafintosh said most of this, I just wrote it down
- usually you call
.destroy()
if it has.destroy
- if it doesnt have
.destroy
you are out of luck and the stream should upgrade to use e.g. newerthrough2
- in request you call
.abort()
(this should get fixed to use.destroy()
) .end()
tries to end the stream gracefully
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
Simply register the two helpers "section" and "yield-section", and start right away! | |
See example below, using ember-cli: |
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
// Use @include colorize('image.png', red, 0.5) | |
@mixin colorize($image, $color, $opacity) { | |
background: $color; | |
$color: transparentize($color, 1 - $opacity); | |
background: -webkit-linear-gradient(left, $color, $color), url($image); | |
background: -moz-linear-gradient(left, $color, $color), url($image); | |
background: -ms-linear-gradient(left, $color, $color), url($image); | |
background: -o-linear-gradient(left, $color, $color), url($image); | |
} |
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
(function( exports ) { | |
function EventEmitter() {} | |
EventEmitter.prototype.emit = function() { | |
var type, handlers, args, listeners; | |
type = arguments[0]; | |
args = [].slice.call( arguments, 1 ); |
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 | |
rm -rf dist | |
rm -rf build | |
rm -rf *.egg-info | |
python setup.py install |
- touch events to make web apps feel fast
- default mobile css overrides (-webkit-touch-callout: none; etc)
- using zepto to make mobile web apps
- client side templating and routing for quick loading apps
- supporting retina devices with sprites
- css3 flexible box model and column layouts for responsive web apps
- using phonegap to deploy web apps as native
- web first development workflow (chrome dev tools, safari debugging)
- how to submit a web app to the app store + google play
- cross platform mobile code via feature detection
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
PopKit.Color = SC.Object.extend SC.Copyable, | |
rgb: (-> | |
PopKit.Color.hsbToRgb(@get("hsb")) | |
).property("hsb") | |
copy: -> PopKit.Color.create(hsb: @get("hsb")) | |
PopKit.Color.reopenClass | |
hsbToRgb: (hsb) -> | |
[h, s, b] = hsb |
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
//in your application, rather than using window.location to get the current url | |
App.getLocation = function(){ | |
return window.location.protocol + '//' + window.location.host | |
+ '/' + Backbone.history.options.root + Backbone.history.getFragment() | |
} |
OlderNewer