Skip to content

Instantly share code, notes, and snippets.

View brancusi's full-sized avatar
😍

Aram Zadikian brancusi

😍
View GitHub Profile
<header class="navbar navbar-fixed-top navbar-inverse">
<div class="navbar-inner">
<div class="container">
<%= link_to "Pet App", root_path, id: "logo" %>
<nav>
<ul class="nav pull-right">
<li><%= link_to "Home", root_path %></li>
<li><%= link_to "About", about_path %></li>
<li><%= link_to "Contact", contact_path %></li>
@brancusi
brancusi / gist:8509530
Created January 19, 2014 19:10
Jitsu deploy failed
error: Error running command deploy
error: npm exited with code 1
error: npm installation failed, please double check your package.json dependencies
error: Nodejitsu Error (500): Internal Server Error
help: For help with this error contact Nodejitsu Support:
help: webchat: <http://webchat.nodejitsu.com/>
help: irc: <irc://chat.freenode.net/#nodejitsu>
help: email: <support@nodejitsu.com>
help:
help: Copy and paste this output to a gist (http://gist.github.com/)
totalFactor:function(){
return this.get('parent.totalFactor') * this.get('quantity');
}.property('parent.isFulfilled', 'quantity'),
var Session = Ember.Object.extend({isAuthenticated:true});
export default {
name: 'session',
initialize: function(container, application) {
application.register('service:session', Session);
application.inject('controller', 'session', 'service:session');
}
Ember.onLoad('Ember.Application', function(Application) {
Application.initializer({
name: 'firebase',
initialize: function(container, application) {
application.register('adapter:-firebase', DS.FirebaseAdapter);
application.register('serializer:-firebase', DS.FirebaseSerializer);
}
});
});
@brancusi
brancusi / gist:d23c3b608f0773838c11
Last active August 29, 2015 14:00
Filter Mixin
export default Ember.Mixin.create({
filteredItemCollection:function(types){
var _this = this;
return new Ember.RSVP.Promise(function(resolve, error){
_this.store.find('item').then(function(collection){
var filtered = collection.filter(function(item){
Promise {_id: 258, _label: undefined, _subscribers: Array[0], constructor: function, _guidKey: "rsvp_1399241644549-"…}
__ember1399241644542_meta: Meta
_detail: Array[6]
0: Class
1: Class
2: Class
3: Class
4: Class
5: Class
length: 6
Class {isFulfilled: true, isRejected: false, toString: function, __each: Class, content: (...)…}
@each: (...)
get @each: function () {
set @each: function (value) {
__each: Class
__ember1399241699509: "ember561"
__ember1399241699509_meta: Object
__nextSuper: undefined
arrangedContent: (...)
content: (...)
@brancusi
brancusi / javascript
Created May 4, 2014 22:44
This breaks
filterable:function(types){
return this.store.find('item').then(function(collection){
return collection.filter(function(item){
return types.contains(item.get('typeTag'));
});
});
},
filterable:function(types){
return this.store.find('item');
},