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/initializers/compass.rb | |
require 'compass' | |
location_hash = { | |
"#{RAILS_ROOT}/app/stylesheets" => "#{RAILS_ROOT}/public/stylesheets" | |
} | |
Theme.find_all.map(&:name).each do |theme| | |
location_hash["#{RAILS_ROOT}/themes/#{theme}/stylesheets"] = "#{RAILS_ROOT}/themes/#{theme}/stylesheets" | |
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
$ cd /tmp | |
$ svn co http://svn.apache.org/repos/asf/couchdb/trunk couchdb | |
$ sudo port install automake autoconf libtool help2man icu spidermonkey erlang | |
$ cd couchdb | |
$ ./bootstrap | |
$ ./configure | |
$ make && sudo make install | |
$ sudo couchdb |
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 sources -a http://gems.github.com | |
$ sudo gem install foca-integrity | |
$ integrity install /path/to/my/integrity/install |
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
$ sudo apt-get install sqlite3 libsqlite3-dev | |
$ sudo gem install sqlite3-ruby |
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 *:80> | |
ServerName integrity.example.com | |
DocumentRoot /var/www/integrity/public | |
</VirtualHost> |
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
$ mysql -uroot p | |
mysql> CREATE USER integrity INDENTIFIED BY PASSWORD 'mypassword123'; | |
mysql> CREATE DATABASE my_cool_application_test; | |
mysql> GRANT ALL ON my_cool_application_test.* TO 'integrity'@localhost IDENTIFIED BY 'mypassword123'; |
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
test: | |
adapter: mysql | |
encoding: utf8 | |
database: my_cool_application_test | |
username: integrity | |
password: mypassword123 |
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
test: | |
adapter: sqlite3 | |
database: db/test.sqlite3 | |
timeout: 5000 |
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
namespace :test do | |
task :move_test_db_config do | |
require 'ftools' | |
File.move(RAILS_ROOT+"/config/database.yml.test", RAILS_ROOT+"/config/database.yml") | |
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
class Entry < ActiveRecord::Base | |
named_scope :by_date, lambda { |*args| | |
{ | |
:order => "starts_at asc", | |
:conditions => ["starts_at BETWEEN ? AND ?", args[0].beginning_of_day.to_s(:db), (args[1]||Time.now).end_of_day.to_s(:db)] | |
} } | |
end |
OlderNewer