<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Md6 &#187; railsrc</title>
	<atom:link href="http://md6.org/tag/railsrc/feed" rel="self" type="application/rss+xml" />
	<link>http://md6.org</link>
	<description>Blog</description>
	<lastBuildDate>Sun, 28 Mar 2010 08:24:38 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>irbrc i railsrc</title>
		<link>http://md6.org/irbrc-i-railsrc</link>
		<comments>http://md6.org/irbrc-i-railsrc#comments</comments>
		<pubDate>Sat, 31 May 2008 11:28:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[dotfiles]]></category>
		<category><![CDATA[irb]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[railsrc]]></category>

		<guid isPermaLink="false">http://127.0.0.1:3000/33-irbrc-i-railsrc.html</guid>
		<description><![CDATA[Wyprodukowano na podstawie materia&#322;&#243;w znalezionych w sieci.
Linki na ko&#324;cu wpisu.
*.irbrc*

*.railrc*

Prezentacja or&#281;&#380;a:

$ irb
Loading... OK
>> # *dopelnianie nazw metod tabem*
>> p
p                                pretty_print_cycle     [...]]]></description>
			<content:encoded><![CDATA[<p>Wyprodukowano na podstawie materia&#322;&#243;w znalezionych w sieci.</p>
<p>Linki na ko&#324;cu wpisu.<br />
*.irbrc*</p>
<p><ruby/irbrc></p>
<p>*.railrc*<br />
<ruby/railsrc></p>
<p>Prezentacja or&#281;&#380;a:</p>
<pre>
$ irb
Loading... OK
>> # *dopelnianie nazw metod tabem*
>> p<tab><tab>
p                                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 <img src='http://md6.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />
>> class Ble
>>   def b
>>     end
>>   end
=> nil # IRB.conf[:AUTO_INDENT] = true

# method finder! morowo! <img src='http://md6.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />
>> "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 <<test>>"

# mozna tez tak
>> /(s.\w+)/.show_match("foo bar s_test")
=> "foo bar <<s_test>>"
>> /(s.\w+)/.show_match("nie ma")
=> "no match"

# irb_callbacks, zabawka ^^
>> 2.times { sleep 0.52 }
=> 2
=> 1.040 seconds <img src='http://md6.org/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> 

# 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> 
</pre>
<p>Strony z kt&#243;rych korzysta&#322;em przy tworzeniu plik&#243;w konfiguracyjnych:</p>
<p>&#8220;http://errtheblog.com/posts/24-irb-mix-tape&#8221;:http://errtheblog.com/posts/24-irb-mix-tape </p>
<p>&#8220;http://poignantguide.net/ruby/expansion-pak-1.html&#8221;:http://poignantguide.net/ruby/expansion-pak-1.html </p>
<p>&#8220;http://radarek.jogger.pl/2007/05/28/interaktywny-ruby/&#8221;:http://radarek.jogger.pl/2007/05/28/interaktywny-ruby/ </p>
<p>&#8220;http://utilitybelt.rubyforge.org/&#8221;:http://utilitybelt.rubyforge.org/ </p>
<p>&#8220;http://zargony.com/2008/04/28/five-tips-for-developing-rails-applications&#8221;:http://zargony.com/2008/04/28/five-tips-for-developing-rails-applications </p>
<p>&#8220;http://www.sufixo.com/raw/index.php/2006/05/29/tip_ruby_irb_auto-complete/&#8221;:http://www.sufixo.com/raw/index.php/2006/05/29/tip_ruby_irb_auto-complete/ </p>
<p>&#8220;http://drnicwilliams.com/2006/10/12/my-irbrc-for-consoleirb/&#8221;:http://drnicwilliams.com/2006/10/12/my-irbrc-for-consoleirb/ </p>
<p>&#8220;http://snippets.dzone.com/posts/show/2586&#8243;:http://snippets.dzone.com/posts/show/2586 </p>
<p>&#8220;http://dotfiles.org/%7Elattice/.irbrc &#8220;:http://dotfiles.org/%7Elattice/.irbrc  </p>
<p>&#8220;http://dotfiles.org/~topfunky/.irbrc &#8220;:http://dotfiles.org/~topfunky/.irbrc  </p>
<p>&#8220;http://quotedprintable.com/2007/9/13/my-irbrc &#8220;:http://quotedprintable.com/2007/9/13/my-irbrc  </p>
<p>&#8220;http://blog.nicksieger.com/articles/2006/05/30/irbrc-on-windows &#8220;:http://blog.nicksieger.com/articles/2006/05/30/irbrc-on-windows  </p>
<p>&#8220;http://ruby.tie-rack.org/3/my-irbrc/&#8221;:http://ruby.tie-rack.org/3/my-irbrc/</p>
<p>&#8220;http://blog.nicksieger.com/articles/2006/04/23/tweaking-irb&#8221;:http://blog.nicksieger.com/articles/2006/04/23/tweaking-irb </p>
<p>&#8220;http://www.ruby-forum.com/topic/84414#new&#8221;:http://www.ruby-forum.com/topic/84414#new </p>
<p>&#8220;http://redhanded.hobix.com/inspect/stickItInYourIrbrcMethodfinder.html&#8221;:http://redhanded.hobix.com/inspect/stickItInYourIrbrcMethodfinder.html </p>
<p>&#8220;http://nikolasco.livejournal.com/339449.html&#8221;:http://nikolasco.livejournal.com/339449.html </p>
<p>&#8220;http://redhanded.hobix.com/inspect/stickItInYourIrbrcMethodfinder.html&#8221;:http://redhanded.hobix.com/inspect/stickItInYourIrbrcMethodfinder.html </p>
<p>&#8220;http://programmingishard.com/&#8221;:http://programmingishard.com/ </p>
<p>&#8220;http://ozmm.org/posts/railsrc.html&#8221;:http://ozmm.org/posts/railsrc.html </p>
<p>&#8220;http://weblog.jamisbuck.org/2007/2/1/per-developer-configuration&#8221;:http://weblog.jamisbuck.org/2007/2/1/per-developer-configuration </p>
<p>&#8220;http://snipplr.com/view/5135/my-railsrc/&#8221;:http://snipplr.com/view/5135/my-railsrc/</p>
]]></content:encoded>
			<wfw:commentRss>http://md6.org/irbrc-i-railsrc/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
