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
| def random_time(no_older_then = 432000, now = Time.now) | |
| oldest = now - no_older_then | |
| Time.at(rand(no_older_then) + oldest.to_i) | |
| 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
| Relation.find_all_by_to_type('Content::Article').each {|r| r.from_type,r.from_id,r.to_type,r.to_id = r.to_type,r.to_id,r.from_type,r.from_id; r.save} |
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
| Help me I git reset --hard | |
| It is possible to recover it if Git hasn't garbage collected yet. | |
| Get an overview of dangling commits with fsck: | |
| $ git fsck --lost-found | |
| dangling commit b72e67a9bb3f1fc1b64528bcce031af4f0d6fcbf | |
| Recover the dangling commit with rebase: |
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
| jekyll |
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
| rails new bdd_sandbox -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
| source 'http://rubygems.org' | |
| gem 'rails', '3.0.0' | |
| gem 'sqlite3-ruby', :require => 'sqlite3' | |
| group :development, :test do | |
| gem "rspec-rails", ">= 2.0.0.rc" | |
| gem 'remarkable_activerecord', '4.0.0.alpha4' |
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 install bundler | |
| bundle install |
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
| ./script/rails generate rspec:install | |
| => create .rspec | |
| create spec | |
| create spec/spec_helper.rb | |
| create autotest | |
| create autotest/discover.rb |
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
| rake db:migrate | |
| rake spec | |
| => No examples matching ./spec/**/*_spec.rb could be found |
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 install autotest autotest-growl colored | |
| # ~/.autotest | |
| require 'autotest/growl' | |
| # ~/.rspec | |
| --color | |
| --format nested |
OlderNewer