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'; | |
import config from 'minutebase/config/environment'; | |
export default Ember.Component.extend({ | |
classNames: "google-static-map", | |
tagName: "img", | |
attributeBindings: ["src"], | |
width: Ember.computed(function() { | |
return this.element && this.$().width(); |
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('changing masthead via drop', function() { | |
dropFiles('.masthead .drop-zone', [{ name: 'test.svg' }]); | |
andThen(function() { | |
ok(exists('.masthead img[src="http://assets.example.com/test.svg"]'), | |
'expected masthead image to update'); | |
}); | |
}); |
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 { $ } = Ember; | |
/** | |
Reorders elements to the specified state. | |
Examples | |
reorder( | |
'fz-forecast-manager', |
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
--- tests/acceptance/create-homework-test.js | |
+++ tests/acceptance/create-homework-test.js | |
@@ -1,16 +1,14 @@ | |
test('Creating a new homework', function(assert) { | |
visit('/homeworks/new'); | |
- andThen(function() { | |
- const title = 'Underwater basket weaving'; | |
- const description = 'an amazing the description about basket weaving'; | |
+ const title = 'Underwater basket weaving'; |
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
module Foo | |
def self.included(base) | |
base.include Baz | |
end | |
end | |
module Baz | |
def hello | |
"Hi there!" | |
end |
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, inject } = Ember; | |
export default Ember.Service.extend({ | |
store: inject.service(), | |
isPending: computed.readOnly('all.isPending'), | |
all: computed('store', function() { | |
let store = this.get('store'); | |
return store.find('activity'); |
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
{ ember: '1.12.0-beta.1+canary', | |
npm: '2.5.1', | |
ares: '1.9.0-DEV', | |
http_parser: '1.0', | |
modules: '11', | |
node: '0.10.36', | |
openssl: '1.0.1l', | |
phantomjs: '1.9.8', | |
uv: '0.10.30', | |
v8: '3.14.5.9', |
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
def permute(list) | |
list # => ["a", "b", "c", "d"], ["b", "c", "d"], ["c", "d"] | |
head, *tail = list | |
head # => "a", "b", "c" | |
tail # => ["b", "c", "d"], ["c", "d"], ["d"] | |
if tail.count == 1 | |
[[head, tail[0]], [tail[0], head]] | |
else | |
tp = permute(tail) |