Skip to content

Instantly share code, notes, and snippets.

View mupkoo's full-sized avatar

Mirko Akov mupkoo

View GitHub Profile
@tmcallister
tmcallister / faye.rb
Created May 23, 2012 23:52
Faye with nginx config
FAYE_TOKEN = 'secretToken'
if defined? Rails
if Rails.env == 'development'
FAYE_URI = "http://#{APP_CONFIG[:nameremoved_service][:host]}:9292/faye"
else
FAYE_URI = "https://#{APP_CONFIG[:nameremoved_service][:host]}/faye"
end
@ncolgan
ncolgan / gist:4323483
Created December 17, 2012 23:38
Singleton resources in ember.js
App.Store = DS.Store.extend({
revision: 10,
adapter: DS.RESTAdapter.extend({
bulkCommit: false,
find: function(store, type, id) {
if (id === 'singleton') {
var url = '/' + this.rootForType(type);
$.getJSON(url, function(data) {
data.id = id;
store.load(type, id, data);