Skip to content

Instantly share code, notes, and snippets.

View alexspeller's full-sized avatar
🏁

Alex Speller alexspeller

🏁
View GitHub Profile
@alexspeller
alexspeller / router.js
Last active December 24, 2015 17:29 — forked from anonymous/router.js
// For more information see: http://emberjs.com/guides/routing/
App.Router.map(function() {
this.resouce('plan', function() {
this.resource('projects', function() {
this.resource('project', {path: ':project_id'})
});
});
});
Tab a
// etc etc
{{view App.TimePickerView name='timepicker'}}
App.TimePickerView = Ember.View.extend({
templateName: 'timepicker',
didInsertElement: function() {
this.$('[name=' + this.get('name') + ']').timepicker({
minuteStep: 1,
showSeconds: true,
App.SomeComponent = Em.Component.extend
externalLibDidChange: (newValue) ->
@set 'value', newValue
valueDidChange: (->
Em.run.once @, 'updateExternalLibValue'
).observes 'value'
updateExternalLibValue: ->
externalLib.update @get('value')
App.Store = DS.Store.extend
pushRecord: (type, record) ->
key = type.underscore().pluralize()
payload = {}
payload[key] = [record]
@pushPayload type, payload
@getById type, record.id
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Foo = Em.Object.extend
someProp: Em.computed 'otherProp1', 'otherProp2', ->
@get('otherProp1') + @get('otherProp2')
# generated by Slic3r 0.9.11-dev on Sun Nov 24 14:47:03 2013
avoid_crossing_perimeters =
bed_size = 165,160
bed_temperature = 95
bottom_solid_layers = 3
bridge_acceleration = 0
bridge_fan_speed = 100
bridge_flow_ratio = 1
bridge_speed = 60
brim_width = 0
Em.ApplicationRoute = Em.Route.extend({
activate: function() {
var self = this;
$(document).keypress(function(e) {
if (/* it is the right arrow */) {
self.send('navigateRight');
} else if (/* it is the left arrow */) {
self.send('navigateLeft');
}
});
╭─alex@aspeller ~/opensource/ember.js ‹2.0.0-p353› ‹improve-notempty-docs›
╰─➤ time bundle check
Resolving dependencies...
The Gemfile's dependencies are satisfied
bundle check 0.40s user 0.07s system 98% cpu 0.467 total