This file contains 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
# rotate rails logs on OS X using newsyslog | |
# Place this file in /etc/newsyslog.d/ | |
# change the logfilename to match where your rails apps are | |
# count: how many old files to keep around, this is dev, so 0 | |
# size: 1000 kb | |
# when: * - only rely on the size property | |
# flags: G - interpret logfilename as a shell pattern | |
# logfilename [owner:group] mode count size when flags [/pid_file] [sig_num] | |
/forge38/clients/**/**/rails/log/*.log 666 0 1000 * G |
This file contains 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
# add something like this to cron on a machine at home to always have a | |
# file with your current ip address of your home. | |
@hourly /usr/bin/curl www.whatismyip.com/automation/n09230945.asp > Dropbox/homeip.txt |
This file contains 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
58143 entries for drawing 1691 | |
Archived 5000 entries in 23.919985 | |
Archived 5000 entries in 19.767098 | |
Archived 5000 entries in 20.035886 | |
Archived 5000 entries in 22.990958 | |
Archived 5000 entries in 19.463445 | |
Archived 5000 entries in 24.24046 | |
Archived 5000 entries in 22.053064 | |
Archived 5000 entries in 20.417995 | |
Archived 5000 entries in 17.902337 |
This file contains 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 Abstract | |
def abstract_methods(*args) | |
args.each do |name| | |
class_eval(<<-END, __FILE__, __LINE__) | |
def #{name}(*args) | |
raise NotImplementedError.new("You must implement #{name}.") | |
end | |
END | |
end | |
end |
This file contains 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
config.action_controller.asset_host = Proc.new do |source, request| | |
"#{request.protocol}asset#{source.hash % 4}.#{CONFIG.domain}" | |
end if ['staging', 'production', 'development'].include?(Rails.env) |
This file contains 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
NOTICE: CREATE TABLE will create implicit sequence "announcements_id_seq" for serial column "announcements.id" | |
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "announcements_pkey" for table "announcements" | |
NOTICE: CREATE TABLE will create implicit sequence "comments_id_seq" for serial column "comments.id" | |
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "comments_pkey" for table "comments" | |
NOTICE: CREATE TABLE will create implicit sequence "delayed_jobs_id_seq" for serial column "delayed_jobs.id" | |
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "delayed_jobs_pkey" for table "delayed_jobs" | |
NOTICE: CREATE TABLE will create implicit sequence "email_reminder_templates_id_seq" for serial column "email_reminder_templates.id" | |
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "email_reminder_templates_pkey" for table "email_reminder_templates" | |
NOTICE: CREATE TABLE will create implicit sequence "friends_id_seq" for serial column "friends.id" | |
NOTICE: CREATE |
This file contains 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 Question < ActiveRecord::Base | |
belongs_to :question_group | |
has_many :all_options, :dependent => :destroy, :class_name => 'Option' | |
has_many :options, :conditions => {:active => true} | |
has_many :correct_options, :conditions => {:correct => true, :active => true}, :class_name => 'Option' | |
has_many :askings | |
has_many :notes, :as => :notable, :dependent => :destroy | |
scope :active, where(:active => true) | |
scope :inactive, where(:active => false) |
This file contains 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
server { | |
listen 3838; | |
server_name r38y.publicdomain.com; | |
location / { | |
proxy_pass http://web1.tunnlr.com:publicport/; | |
proxy_redirect off; | |
} | |
} | |
server { |
This file contains 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
ree-1.8.7-2011.03 :003 > Time.zone.name | |
=> "UTC" | |
ree-1.8.7-2011.03 :004 > u[:updated_at] | |
=> Wed Jul 13 18:45:00 UTC 2011 | |
ree-1.8.7-2011.03 :005 > Time.zone = 'Eastern Time (US & Canada)' | |
=> "Eastern Time (US & Canada)" | |
ree-1.8.7-2011.03 :006 > Time.zone.name | |
=> "Eastern Time (US & Canada)" | |
ree-1.8.7-2011.03 :007 > u[:updated_at] | |
=> Wed Jul 13 18:45:00 UTC 2011 |