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
# Settings specified here will take precedence over those in config/environment.rb | |
# The production environment is meant for finished, "live" apps. | |
# Code is not reloaded between requests | |
config.cache_classes = true | |
# Use a different logger for distributed setups | |
# config.logger = SyslogLogger.new | |
# Full error reports are disabled and caching is turned on |
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
From: "Stuart Slade" <shiva06804> | |
Date: Mon Aug 19, 2002 07:53:22 AM US/Pacific | |
Subject: Nuclear Warfare 101 | |
The Nuclear Game - An Essay on Nuclear Policy Making | |
When a country first acquires nuclear weapons it does so out of a very accurate perception that possession of nukes fundamentally changes it relationships with other powers. What nuclear weapons buy for a New Nuclear Power (NNP) is the fact that once the country in question has nuclear weapons, it cannot be beaten. It can be defeated, that is it can be prevented from achieving certain goals or stopped from following certain courses of action, but it cannot be beaten. It will never have enemy tanks moving down the streets of its capital, it will never have its national treasures looted and its citizens forced into servitude. The enemy will be destroyed by nuclear attack first. A potential enemy knows that so will not push the situation to the point where our NNP is on the verge of being beaten. In effect, the effect of acquiring nuclear weapons is t |
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
# This doesn't work | |
class Product < ActiveRecord::Base | |
# Define a public Class method on Product | |
def self.get_recommended_for_subscriber(subscriber) | |
# ... call some web service, then use find to return a product instance ... | |
end | |
add_method_tracer :get_recommended_for_subscriber, 'Custom/Product.get_recommended_for_subscriber' | |
# Instance methods of Product go here |
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 Product < ActiveRecord::Base | |
class << self | |
# Define a public instance method on the singleton Class named Product | |
def get_recommended_for_subscriber(subscriber) | |
# ... call some web service, then use find to return a product instance ... | |
end | |
add_method_tracer :get_recommended_for_subscriber, 'Custom/Product.get_recommended_for_subscriber' | |
end |
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
# -*- ruby -*- | |
God.watch do |w| | |
w.name = "couchdb" | |
w.interval = 10.seconds | |
w.start = "su - couchdb -s /bin/bash -c '/usr/local/bin/couchdb -b'" | |
w.stop = "su - couchdb -s /bin/bash -c '/usr/local/bin/couchdb -d'" | |
w.pid_file = "/usr/local/var/run/couchdb.pid" |
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
#!/usr/bin/env ruby | |
# Crontab example: | |
# 55 * * * * (cd $HOME/rails-app/current ; ./script/check_bj_activity.rb >/dev/null) | |
TEST_SQL = <<-SQL | |
SELECT COUNT(*) FROM bj_job WHERE state = 'finished' | |
AND finished_at > DATE_SUB(UTC_TIMESTAMP(), INTERVAL 1 HOUR) | |
SQL |
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
LoadModule passenger_module <your-passenger-root-path>/ext/apache2/mod_passenger.so | |
PassengerRoot <your-passenger-root-path> | |
PassengerUseGlobalQueue on | |
PassengerMaxPoolSize 16 | |
PassengerPoolIdleTime 0 | |
PassengerMaxRequests 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
gem "rails", "2.3.5" | |
gem "sqlite3-ruby" | |
clear_sources | |
source "http://gemcutter.org" | |
disable_system_gems | |
bundle_path 'gems' |
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
DEPRECATION WARNING: RAILS_ROOT is deprecated! Use Rails.root instead. (called from join at /Users/xac/swx/eve-alert/gems/bundler/gems/shoulda-5bdb93ac5542865aecd4806415ea2a68ea660c1c-rails3/lib/shoulda/autoload_macros.rb:40) | |
/Users/xac/swx/eve-alert/gems/bundler/gems/shoulda-5bdb93ac5542865aecd4806415ea2a68ea660c1c-rails3/lib/shoulda/autoload_macros.rb:40:in `join': can't convert #<Class:0x101ea7fe8> into String (TypeError) | |
from /Users/xac/swx/eve-alert/gems/bundler/gems/shoulda-5bdb93ac5542865aecd4806415ea2a68ea660c1c-rails3/lib/shoulda/autoload_macros.rb:40:in `autoload_macros' | |
from /Users/xac/swx/eve-alert/gems/bundler/gems/shoulda-5bdb93ac5542865aecd4806415ea2a68ea660c1c-rails3/lib/shoulda/autoload_macros.rb:40:in `map' | |
from /Users/xac/swx/eve-alert/gems/bundler/gems/shoulda-5bdb93ac5542865aecd4806415ea2a68ea660c1c-rails3/lib/shoulda/autoload_macros.rb:40:in `autoload_macros' | |
from /Users/xac/swx/eve-alert/gems/bundler/gems/shoulda-5bdb93ac5542865aecd4806415ea2a68ea660c1c-rails3/lib/shoulda/rails.rb:1 |
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
module ActionController | |
module StatusCodes #:nodoc: | |
# Defines the standard HTTP status codes, by integer, with their | |
# corresponding default message texts. | |
# Source: http://www.iana.org/assignments/http-status-codes | |
STATUS_CODES = { | |
100 => "Continue", | |
101 => "Switching Protocols", | |
102 => "Processing", |