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
def last_sunday_of_last_month | |
month = 1.month.ago | |
days = month.end_of_month.mday | |
date = Date.new(month.year, month.month, days) | |
Date.new(month.year, month.month, (days - date.wday)) | |
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
Job failed to load: undefined method `keys' for nil:NilClass. Try to manually require the required file. (Delayed::Backend::DeserializationError) |
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
Latest Bundler | |
source 'http://gemcutter.org' | |
gem 'rails', '3.0.0.beta3', :git => "git://github.com/rails/rails.git" | |
#:path => "/Users/chris/projects/open_source/rails" | |
gem 'pg' | |
gem 'haml' | |
gem "authlogic", :git => "git://github.com/bpokosh/authlogic.git" |
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
def save | |
numbers_not_zero? ? super : false | |
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
<VirtualHost *> | |
RewriteEngine On | |
RewriteCond %{HTTP_HOST} ^www.christas\-art\.com$ [NC] | |
RewriteRule ^(.*)$ http://christas-art.com/$1 [R=301,L] | |
ServerName christas-art.com | |
DocumentRoot /u/apps/art_production/current/public | |
RailsEnv production | |
<Directory "/u/apps/art_production/current/public"> |
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
map.resources :"foo-bar", :controller => "foo_bar", :only => [:new, :create, :index] |
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
2010-07-16T17:10:45+1000: *** Starting job worker delayed_job host:jfrails2 pid:9214 | |
2010-07-16T17:12:40+1000: * [Worker(delayed_job host:jfrails2 pid:9214)] acquired lock on ScorecardJob | |
2010-07-16T17:12:40+1000: * [JOB] delayed_job host:jfrails2 pid:9214 failed with ActiveRecord::StatementInvalid: PGError: server closed the connection unexpectedly | |
This probably means the server terminated abnormally | |
before or while processing the request. | |
: SELECT * FROM "outlets" - 0 failed attempts | |
2010-07-16T17:12:40+1000: * [Worker(delayed_job host:jfrails2 pid:9214)] acquired lock on ScorecardJob | |
2010-07-16T17:12:40+1000: * [JOB] delayed_job host:jfrails2 pid:9214 failed with ActiveRecord::StatementInvalid: PGError: no connection to the server | |
: SELECT * FROM "outlets" - 1 failed attempts | |
2010-07-16T17:12:40+1000: 2 jobs processed at 53.2326 j/s, 2 failed ... |
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
grey='\e[0;90m' | |
ZSH_THEME_GIT_PROMPT_PREFIX="%{$grey%}(" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_DIRTY="%{$grey%}) %{$fg[yellow]%}✗%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_CLEAN="%{$grey%})" | |
function pat_prompt { | |
(( spare_width = ${COLUMNS} )) | |
prompt=" " |
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
gem install autotest | |
gem install autotest/fs_event | |
gem install autotest/growl | |
gem install autotest/rails | |
#### ~/.autotest | |
require 'autotest/growl' | |
require 'autotest/fsevent' |
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
So I have domain.com, and want to be able to access account.domain.com as a way of doing Account keys. That part was easy. | |
But I also want to have staging.domain.com to have my staging environment and need to be able to resolve account.staging.domain.com to get accounts on my staging server, at first I screwed this up by doing an A record for staging and one for *.staging. | |
All I actually needed was an A record for domain.com, and one for *.domain.com and covers everything, so that's what I have now. |