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
[~/src/rip] master $ integrity launch | |
/Users/imownbey/.rip/active/lib/integrity: Is a directory - /Users/imownbey/.rip/active/lib/integrity (Errno::EISDIR) | |
from /usr/local/bin/integrity:19:in `load' | |
from /usr/local/bin/integrity:19 |
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
<VirtualHost *:80> | |
ServerName www.example.com | |
ServerAlias example.com dev.example.com | |
DocumentRoot /path/ | |
RewriteEngine On | |
RewriteCond %{HTTP_HOST} ^(dev.)?example.com | |
RewriteRule (.*) http://www.example.com/$1 [R=301,L] | |
</VirtualHost> |
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
>> user1 = User.first | |
User Load (0.3ms) SELECT * FROM `users` LIMIT 1 | |
User Columns (1.7ms) SHOW FIELDS FROM `users` | |
=> #<User id: 1, login: "imownbey", first_name: nil, last_name: nil, email: "[email protected]", crypted_password: "855e0c5f4b94b17bde30631bde6c000af0bf1b70", salt: "68e2008908516c79514629a803f97a382e19890f", created_at: "2009-03-15 02:07:18", updated_at: "2009-03-15 02:07:59", remember_token: nil, remember_token_expires_at: nil, city_id: 76427, avatar_file_name: nil, avatar_content: nil, avatar_file_size: nil, sex: nil, status: nil, occupation: nil, birthday: nil> | |
>> user2 = User.last | |
User Load (0.4ms) SELECT * FROM `users` ORDER BY users.id DESC LIMIT 1 | |
=> #<User id: 4, login: "iojdjf", first_name: "fdaojs", last_name: "oifjdoajfd", email: "[email protected]", crypted_password: "51df6a1bcba81a48bdb2468cdd02ae4fc5aca7bf", salt: "598f03e922f117fdded8d92977dbcbaff00d39d9", created_at: "2009-03-15 22:44:19", updated_at: "2009-03-15 22:44:19", remember_token: nil, remember_token_ |
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
# == Schema Information | |
# Schema version: 20090222005710 | |
# | |
# Table name: users | |
# | |
# id :integer(4) not null, primary key | |
# login :string(40) | |
# first_name :string(100) | |
# last_name :string(100) | |
# email :string(100) |
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 Message < ActiveRecord::Base | |
belongs_to :sender, :class_name => "User" | |
belongs_to :receiver, :class_name => "User" | |
validates_presence_of :body | |
before_validation_on_create :set_read | |
def set_read | |
self.read = false |
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
:headers => ['',cell([0,0], :text => "Febuary"), ''], |
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
require 'rubygems' | |
require 'prawn' | |
require 'prawn/layout' | |
require 'prawn/format' | |
Prawn::Document.generate("current-events.pdf", | |
:page_size => [432, 810], | |
:left_margin => 0, | |
:right_margin => 0, | |
:top_margin => 0, | |
:bottom_margin => 0) do |
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
require 'rubygems' | |
require 'prawn' | |
require 'prawn/layout' | |
require 'prawn/format' | |
Prawn::Document.generate("current-events.pdf", | |
:page_size => [432, 810], | |
:left_margin => 0, | |
:right_margin => 0, | |
:top_margin => 0, | |
:bottom_margin => 0) do |
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
require 'rubygems' | |
require 'prawn' | |
require 'prawn/layout' | |
require 'prawn/format' | |
Prawn::Document.generate("current-events.pdf", | |
:page_size => [432, 810], | |
:left_margin => 0, | |
:right_margin => 0, | |
:top_margin => 0, | |
:bottom_margin => 0) do |
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 http://blog.jayfields.com/2008/02/rake-task-overwriting.html | |
class Rake::Task | |
def abandon | |
@actions.clear | |
end | |
end | |
OLD_MIGRATION = Rake::Task["db:migrate"] | |
Rake::Task["db:migrate"].abandon |