This file contains hidden or 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
diff --git a/config/environments/production.rb b/config/environments/production.rb | |
index f6124a6..7daf949 100644 | |
--- a/config/environments/production.rb | |
+++ b/config/environments/production.rb | |
@@ -31,5 +31,10 @@ config.after_initialize do | |
end | |
$PAYPAL_LOGIN = $PAYPAL_CONFIG[Rails.env]["api_username"] | |
$PAYPAL_PASSWORD = $PAYPAL_CONFIG[Rails.env]["api_password"] | |
-config.cache_store = ActiveSupport::Cache::MemCacheStore.new(Memcached::Rails.new("10.211.47.148:11211", :namespace => "wb_data:")) | |
-ActionController::Base.cache_store = :mem_cache_store, Memcached::Rails.new("10.211.47.148:11211", :namespace => "wb_data:") |
This file contains hidden or 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
class ActiveRecord::ConnectionAdapters::MysqlAdapter | |
def active? | |
true | |
end | |
def execute_with_retry_if_fail(*args) | |
execute_without_retry_if_fail(*args) | |
rescue ActiveRecord::StatementInvalid => e | |
if e.message =~ /server has gone away/i | |
warn "Server timed out, retrying" |
This file contains hidden or 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
https://gist.github.com/946747 |
This file contains hidden or 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
# join model | |
class Membership < ActiveRecord::Base | |
include PortalEntity | |
include Notifiable | |
cattr_accessor :skip_create_feed | |
@@skip_create_feed = false | |
# virtual attribute for verification purposes | |
attr_accessor :password |
This file contains hidden or 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
// requires Store.js | |
OrgSync.cache = (function(store) { | |
if (!store || typeof store.get !== 'function' || typeof store.set !== 'function') { | |
throw new Error("Store API not defined."); | |
} | |
var api = {}; | |
var now = function () { | |
return parseInt((new Date).getTime() / 1000); |
This file contains hidden or 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
res = Faraday.get("http://weather.yahooapis.com/forecastrss?w=#{woe_id}") | |
xml = Nokogiri::XML(res.body) | |
loc_xml = xml.css('yweather|location') | |
weather_xml = xml.css('yweather|condition') | |
@weather_data = { | |
:city => loc_xml.attr('city').text, | |
:state => loc_xml.attr('region').text, | |
:country => loc_xml.attr('country').text, |
This file contains hidden or 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
commit b517816e0944df9d4e6885471b1fc4671355bfe4 | |
Author: Clifton King <[email protected]> | |
Date: Thu Jun 16 10:39:52 2011 -0500 | |
fixed creating a community | |
diff --git a/app/models/shareable.rb b/app/models/shareable.rb | |
index 6512439..dc3038c 100644 | |
--- a/app/models/shareable.rb | |
+++ b/app/models/shareable.rb |
This file contains hidden or 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
fs = require 'fs' | |
http = require 'http' | |
{EventEmitter} = require 'events' | |
path = require 'path' | |
colors = require 'colors' | |
hostsDir = path.join __dirname, '../hosts' | |
class HostList extends EventEmitter | |
constructor: (@group) -> | |
[self, @servers, @queue] = [this, {}, []] |
This file contains hidden or 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
fe1 localhost:3000 | |
fe2 127.0.0.1:3000 | |
fe3 0.0.0.0:3000 |
This file contains hidden or 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
fe1 localhost:3000 | |
fe2 127.0.0.1:3000 | |
fe3 0.0.0.0:3000 |
OlderNewer