Skip to content

Instantly share code, notes, and snippets.

View knownasilya's full-sized avatar
🌒
And, behold, I come quickly; and my reward is with me.. Rev 22:12

Ilya Radchenko knownasilya

🌒
And, behold, I come quickly; and my reward is with me.. Rev 22:12
View GitHub Profile
App.ResultsCollectionView = Ember.CollectionView.extend({
classNames: ["search-results", "link-list", "accent-blue"],
classNameBindings: ["isVisible"],
tagName: "ul",
isVisible: false,
itemViewClass: Ember.View.extend({
templateName: "resultsCollectionItem",
tagName: "li",
classNameBindings: ["isSelected:selected"],
init: function () {
@knownasilya
knownasilya / findQuery.js
Created August 2, 2013 14:09
Ember Data modify props.
ajax: function (url, type, hash) {
var adapter = this;
return new Ember.RSVP.Promise(function (resolve, reject) {
hash = hash || {};
hash.url = url;
hash.type = type;
hash.dataType = "jsonp";
hash.context = adapter;
@knownasilya
knownasilya / stacktrace.txt
Created August 2, 2013 17:11
Backburner.end error
(anonymous function) ember-1.0.0-rc.6.js:364
rejectionHandler arcgis_adapter.js:46
invokeCallback ember-1.0.0-rc.6.js:7244
Promise.then ember-1.0.0-rc.6.js:7298
EventTarget.trigger ember-1.0.0-rc.6.js:7067
__exports__.Promise ember-1.0.0-rc.6.js:7365
DeferredActionQueues.flush ember-1.0.0-rc.6.js:4744
Backburner.end ember-1.0.0-rc.6.js:4830
Backburner.run ember-1.0.0-rc.6.js:4869
Ember.run ember-1.0.0-rc.6.js:5200
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "precise32"
App.ContentView = Ember.View.extend({
views: [App.FirstView, App.SecondView, App.ThirdView]
});
@knownasilya
knownasilya / FormViews.js
Last active December 20, 2015 20:29
Ember ContainerView
App.FirstFormView = Ember.View.create({
templateName: 'firstForm'
});
App.SecondFormView = Ember.View.create({
templateName: 'secondForm'
});
App.ThirdFormView = Ember.View.create({
templateName: 'thirdForm'
@knownasilya
knownasilya / base.py
Last active December 20, 2015 20:59
psql user role
# Django settings for nycbb project.
from os import environ
from os.path import join, abspath, dirname
# Private settings
SECRET_KEY = environ["SECRET_KEY"]
DB_USER = environ["DB_USER"]
DB_PASSWORD = environ["DB_PASSWORD"]
App.BuildingRoute = Ember.Route.extend({
model: function (params) {
return [{ id: params.building_id, address: '200 Broadway Blvd', rating: 4 }];
},
renderTemplate: function () {
this.render({
into: 'map'
});
}
});
@knownasilya
knownasilya / User.js
Last active December 21, 2015 14:19
Ember Model findQuery
App.User.adapter = App.DjangoAdapter.create({
find: function (record, id, options) {
var params = options.params || {};
if (!Ember.isEmpty(id) && !Ember.isEmpty(params.password)) {
return this.post('/accounts/api/signin/', {
identification: id,
password: params.password
}).then(function (data) {
console.dir(data);
@knownasilya
knownasilya / new_gist_file
Created August 29, 2013 19:57
ember debug props
LOG_TRANSITIONS: true,
LOG_VIEW_LOOKUPS: true,
LOG_ACTIVE_GENERATION: true,
LOG_BINDINGS: true,
RAISE_ON_DEPRECATION: true,
LOG_STACKTRACE_ON_DEPRECATION: true,