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
POST /graphql | |
Content-Type: application/graphql | |
{ | |
post(id: 1) { | |
id | |
title | |
comments { | |
id | |
body | |
} |
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
gem 'strict_templates' |
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
// app/routes/application.js | |
import Ember from 'ember'; | |
export default Ember.Route.extend({ | |
currentUser: Ember.inject.service(), | |
pusher: Ember.inject.service(), | |
activate() { | |
this._listenToPusherEvents(); | |
}, |
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
$color-list { | |
red #f00, | |
green #0f0, | |
blue #00f | |
} | |
@each $value in $color-list { | |
.#{nth($value, 1)} { | |
color: nth($value, 2); | |
} |
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
<img srcset="https://assets.imgix.net/flower.jpg?w=50 50w, | |
https://assets.imgix.net/flower.jpg?w=100 100w, | |
https://assets.imgix.net/flower.jpg?w=150 150w, | |
... | |
https://assets.imgix.net/flower.jpg?w=5200 5200w, | |
https://assets.imgix.net/flower.jpg?w=5260 5260w" | |
src="https://assets.imgix.net/flower.jpg?w=540" | |
alt="A white flower" | |
/> |
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
<img srcset="https://assets.imgix.net/flower.jpg?w=50 50w, | |
https://assets.imgix.net/flower.jpg?w=100 100w, | |
https://assets.imgix.net/flower.jpg?w=150 150w, | |
https://assets.imgix.net/flower.jpg?w=200 200w, | |
https://assets.imgix.net/flower.jpg?w=250 250w, | |
https://assets.imgix.net/flower.jpg?w=300 300w, | |
https://assets.imgix.net/flower.jpg?w=350 350w, | |
https://assets.imgix.net/flower.jpg?w=400 400w, | |
https://assets.imgix.net/flower.jpg?w=450 450w, | |
https://assets.imgix.net/flower.jpg?w=500 500w, |
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
<img | |
srcset="asset.png, | |
asset-2x.png 2x, | |
asset-3x.png 3x" | |
src="asset.png" | |
/> |
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
requirejs.config({ | |
paths: { | |
ramda: 'https://cdnjs.cloudflare.com/ajax/libs/ramda/0.13.0/ramda.min' | |
} | |
}); | |
require(['ramda'], function (_) { | |
const trace = _.curry(function(tag, x) { | |
console.log(tag, x); | |
return x; |
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
import Ember from 'ember'; | |
const { computed, on } = Ember; | |
// Our Higher Order Function, as before | |
let has = field => computed.notEmpty(field); | |
// The Component UI fields as before. | |
const UI_FIELDS = ['userName', 'password']; |