<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: hacking code</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Sun, 07 Sep 2008 21:26:21 GMT</pubDate>
    <description>DZone Snippets: hacking code</description>
    <item>
      <title>a simple util for hacking rails on windows</title>
      <link>http://snippets.dzone.com/posts/show/393</link>
      <description>This a simple redish util, that i'm using while hacking my way through rails libs directory. (*nix guys has their natural power tools)&lt;br /&gt;&lt;code&gt;&lt;br /&gt;found_files = Dir.glob( ARGV[0] + "/**/*.rb")&lt;br /&gt;serach_pattern = Regexp.new( ARGV[1] )&lt;br /&gt;for entry in found_files&lt;br /&gt;  file = File.new(entry,"r")&lt;br /&gt;  line_count=0&lt;br /&gt;  file.readlines.each { |line|&lt;br /&gt;	line_count+=1&lt;br /&gt;	puts "#{entry}[#{line_count}]:#{line}" if serach_pattern.match(line)&lt;br /&gt;  }&lt;br /&gt;end&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Sat, 18 Jun 2005 01:40:19 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/393</guid>
      <author>cmo (Alaa M. Alawi)</author>
    </item>
  </channel>
</rss>
