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
| models = ActiveRecord::Base.connection.tables | |
| models.delete(ActiveRecord::Migrator.schema_migrations_table_name) | |
| models.each do |table| | |
| ActiveRecord::Base.connection.reset_pk_sequence!(table) | |
| 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
| # in rails application.rb | |
| initializer "postgresql.no_default_string_limit" do | |
| ActiveSupport.on_load(:active_record) do | |
| ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::NATIVE_DATABASE_TYPES[:string].delete(:limit) | |
| end | |
| 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
| #open all new and modified files in textmate tabs for open project: | |
| git status -s -uall | cut -b 4- | xargs -n 1 mate |
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
| initdb -U postgres --encoding=utf8 --locale=en_US -D /usr/local/var/postgres |
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
| ( roughly to the tune of the Ultraman theme song: | |
| http://www.televisiontunes.com/Ultraman.html ) | |
| Tenderlove, Tenderlove | |
| Ruby programming guy | |
| Tenderlove, Tenderlove | |
| he's as awesome as _why | |
| Seattle is his home | |
| he's a Ruby brigadier |
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 'spec_helper' | |
| describe Example::RegistrationsController do | |
| before(:each) do | |
| setup_controller_for_warden | |
| request.env["devise.mapping"] = Devise.mappings[:example] | |
| end | |
| describe "sign up" do | |
| it "does something" |
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
| # reset tables | |
| tables = ActiveRecord::Base.connection.tables | |
| tables.delete("schema_migrations") | |
| tables.each do |table| | |
| ActiveRecord::Base.connection.execute("TRUNCATE TABLE #{table}") | |
| ActiveRecord::Base.connection.reset_pk_sequence!(table) | |
| end | |
| # seed data | |
| # |
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
| alias bo="env EDITOR=mate bundle open $*" |
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
| <!DOCTYPE HTML> | |
| <html> | |
| <head> | |
| <script src="javascripts/jquery.js" type="text/javascript"></script> | |
| <script src="javascripts/handlebars.js" type="text/javascript"></script> | |
| <script id="main" type="text/html"> | |
| <ul> | |
| {{#people}} | |
| <li>{{> link}}</li> |
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 list | cut -f 1 -d " " | xargs -E gem gem dep -R $gem | grep -v "^ \w" | grep -P "^[^\s][^\n]+\n[^ ]" -o | grep -v "^$" | sort | cut -f 2 -d " " |