irbrc i railsrc
Posted by admin | Filed under Uncategorized
Wyprodukowano na podstawie materiałów znalezionych w sieci.
Linki na końcu wpisu.
*.irbrc*
*.railrc*
Prezentacja oręża:
$ irb Loading... OK >> # *dopelnianie nazw metod tabem* >> pp pretty_print_cycle protected_methods po pretty_print_inspect public poc pretty_print_instance_variables public_methods popb print pushb popws printf pushws pp private putc pretty_inspect private_methods puts pretty_print proc pwws >> # wypas >> h = { :foo => 1, :bar => 2, :dupa => false } => {:bar=>2, :foo=>1, :dupa=>false} # <--- dzieki Wirble to jest w kolorze, ale tutaj tego nie widac >> class Ble >> def b >> end >> end => nil # IRB.conf[:AUTO_INDENT] = true # method finder! morowo!
>> "oki".what? == "OKI" "oki".swapcase == "OKI" "oki".swapcase! == "OKI" "oki".upcase == "OKI" "oki".upcase! == "OKI" => ["swapcase", "swapcase!", "upcase", "upcase!"] # show_regexp >> show_regexp("foo bar test", /\w+est/) => "foo bar <
>" # mozna tez tak >> /(s.\w+)/.show_match("foo bar s_test") => "foo bar < >" >> /(s.\w+)/.show_match("nie ma") => "no match" # irb_callbacks, zabawka ^^ >> 2.times { sleep 0.52 } => 2 => 1.040 seconds # duration >> quit 12 minutes and 47 seconds # czas na railsy $ ./script/console Loading development environment (Rails 2.0.2) Loading... OK Loading railsrc...OK linuxlinki> Link.count SQL (0.000222) SET SQL_AUTO_IS_NULL=0 Link Columns (0.041859) SHOW FIELDS FROM `links` SQL (0.000514) SELECT count(*) AS count_all FROM `links` => 207 linuxlinki> sql "show tables" SQL (0.010506) show tables [{"Tables_in_linuxlinki"=>"authors"}, {"Tables_in_linuxlinki"=>"categories"}, {"Tables_in_linuxlinki"=>"links"}, {"Tables_in_linuxlinki"=>"rates"}, {"Tables_in_linuxlinki"=>"redirects"}, {"Tables_in_linuxlinki"=>"rss"}, {"Tables_in_linuxlinki"=>"schema_info"}, {"Tables_in_linuxlinki"=>"sessions"}, {"Tables_in_linuxlinki"=>"taggings"}, {"Tables_in_linuxlinki"=>"tags"}] => nil linuxlinki> link(:first) Link Load (0.000453) SELECT * FROM `links` LIMIT 1 ... linuxlinki>
Strony z których korzystałem przy tworzeniu plików konfiguracyjnych:
“http://errtheblog.com/posts/24-irb-mix-tape”:http://errtheblog.com/posts/24-irb-mix-tape
“http://poignantguide.net/ruby/expansion-pak-1.html”:http://poignantguide.net/ruby/expansion-pak-1.html
“http://radarek.jogger.pl/2007/05/28/interaktywny-ruby/”:http://radarek.jogger.pl/2007/05/28/interaktywny-ruby/
“http://utilitybelt.rubyforge.org/”:http://utilitybelt.rubyforge.org/
“http://zargony.com/2008/04/28/five-tips-for-developing-rails-applications”:http://zargony.com/2008/04/28/five-tips-for-developing-rails-applications
“http://www.sufixo.com/raw/index.php/2006/05/29/tip_ruby_irb_auto-complete/”:http://www.sufixo.com/raw/index.php/2006/05/29/tip_ruby_irb_auto-complete/
“http://drnicwilliams.com/2006/10/12/my-irbrc-for-consoleirb/”:http://drnicwilliams.com/2006/10/12/my-irbrc-for-consoleirb/
“http://snippets.dzone.com/posts/show/2586″:http://snippets.dzone.com/posts/show/2586
“http://dotfiles.org/%7Elattice/.irbrc “:http://dotfiles.org/%7Elattice/.irbrc
“http://dotfiles.org/~topfunky/.irbrc “:http://dotfiles.org/~topfunky/.irbrc
“http://quotedprintable.com/2007/9/13/my-irbrc “:http://quotedprintable.com/2007/9/13/my-irbrc
“http://blog.nicksieger.com/articles/2006/05/30/irbrc-on-windows “:http://blog.nicksieger.com/articles/2006/05/30/irbrc-on-windows
“http://ruby.tie-rack.org/3/my-irbrc/”:http://ruby.tie-rack.org/3/my-irbrc/
“http://blog.nicksieger.com/articles/2006/04/23/tweaking-irb”:http://blog.nicksieger.com/articles/2006/04/23/tweaking-irb
“http://www.ruby-forum.com/topic/84414#new”:http://www.ruby-forum.com/topic/84414#new
“http://redhanded.hobix.com/inspect/stickItInYourIrbrcMethodfinder.html”:http://redhanded.hobix.com/inspect/stickItInYourIrbrcMethodfinder.html
“http://nikolasco.livejournal.com/339449.html”:http://nikolasco.livejournal.com/339449.html
“http://redhanded.hobix.com/inspect/stickItInYourIrbrcMethodfinder.html”:http://redhanded.hobix.com/inspect/stickItInYourIrbrcMethodfinder.html
“http://programmingishard.com/”:http://programmingishard.com/
“http://ozmm.org/posts/railsrc.html”:http://ozmm.org/posts/railsrc.html
“http://weblog.jamisbuck.org/2007/2/1/per-developer-configuration”:http://weblog.jamisbuck.org/2007/2/1/per-developer-configuration
“http://snipplr.com/view/5135/my-railsrc/”:http://snipplr.com/view/5135/my-railsrc/
Tags: dotfiles, irb, Rails, railsrc