<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" xml:lang="en-US">
  <title>Rubify - Blog</title>
  <id>tag:rubify.com,2008:mephisto/</id>
  <generator version="0.7.3" uri="http://mephistoblog.com">Mephisto Noh-Varr</generator>
  
  <link href="http://rubify.com/" rel="alternate" type="text/html" />
  <updated>2008-03-24T10:32:41Z</updated>
  <link rel="self" href="http://feeds.feedburner.com/Rubify" type="application/atom+xml" /><entry xml:base="http://rubify.com/">
    <author>
      <name>chardy</name>
    </author>
    <id>tag:rubify.com,2008-03-24:153</id>
    <published>2008-03-24T10:32:00Z</published>
    <updated>2008-03-24T10:32:41Z</updated>
    <link href="http://feedproxy.google.com/~r/Rubify/~3/l1wMGkrRpZE/world-economy-2008" rel="alternate" type="text/html" />
    <title>World Economy 2008</title>
<content type="html">
            &lt;img src="http://comicstripblog.com/wp-content/comicstripcartoon466.gif" /&gt;
          </content>  <feedburner:origLink>http://rubify.com/2008/3/24/world-economy-2008</feedburner:origLink></entry>
  <entry xml:base="http://rubify.com/">
    <author>
      <name>chardy</name>
    </author>
    <id>tag:rubify.com,2007-12-31:151</id>
    <published>2007-12-31T19:51:00Z</published>
    <updated>2008-01-08T03:47:49Z</updated>
    <link href="http://feedproxy.google.com/~r/Rubify/~3/FgqEjg3U1c0/happy-new-year-2008" rel="alternate" type="text/html" />
    <title>Happy New Year 2008</title>
<content type="html">
            May all your wish come true and joy in this 2008. :-) I wish you all have a great year ahead. &lt;br /&gt;
&lt;br /&gt;
&lt;img src="http://applegeeks.com/lite/strips/aglite245.jpg" width="500" /&gt;
          </content>  <feedburner:origLink>http://rubify.com/2007/12/31/happy-new-year-2008</feedburner:origLink></entry>
  <entry xml:base="http://rubify.com/">
    <author>
      <name>chardy</name>
    </author>
    <id>tag:rubify.com,2007-10-28:150</id>
    <published>2007-10-28T12:23:00Z</published>
    <updated>2007-10-28T23:48:11Z</updated>
    <category term="RubyOnRails" />
    <link href="http://feedproxy.google.com/~r/Rubify/~3/Y1DSICwfsNI/rails-and-leopard-a-smooth-upgrade" rel="alternate" type="text/html" />
    <title>Rails and Leopard: A smooth upgrade</title>
<content type="html">
            &lt;p&gt;
At 26th October, my leopard order arrived, I &lt;a href="http://www.usingmac.com/2007/10/27/hi-leopard"&gt;wrote&lt;/a&gt; about it on my other &lt;a href="http://www.usingmac.com"&gt;blog&lt;/a&gt;. I was testing it for my G5 machine, and it failed to install when I do upgrade of OS from Tiger to Leopard. Finally I found out, its not because of the bug inside the system, but it because of system conflict from some applications installed, so far I gather from some forums, these are the applications affected: &lt;a href="http://www.unsanity.com/haxies/shapeshifter"&gt;ShapeShifter&lt;/a&gt; and &lt;a href="http://unsanity.com/haxies/ape/"&gt;Application Enhancer&lt;/a&gt;, both product from Unsanity. See this &lt;a href="http://discussions.apple.com/thread.jspa?threadID=1195031&amp;amp;tstart=0"&gt;forum&lt;/a&gt; for more details. Just be prepared to uninstall all the application which you think can affect the default skin of Mac OS X. After that, get ready to back up all your file for pre-caution, so far from my experience, you do not need to do any backup if you do the upgrading of OS from Tiger to Leopard.
&lt;/p&gt;
&lt;p&gt;
I have been thinking twice when I want to upgrade to leopard. Because Apple shipped Leopard with pre installed 29 gems, Ruby 1.8.6 and It run on ZFS or so called 64bits, rather than Tiger 32bits. The implication that may happen, if I do the upgrade, my current configuration and installation which installed with "make install" showed &lt;a href="http://rubify.com/2007/1/2/full-ruby-on-rails-installation-on-mac-intel"&gt;here&lt;/a&gt;, I afraid will be broken or overwrite by the default configuration after upgrading Leopard. Next is the Image Magick installation issue which I think will probably have some problems, memory leaked, and incompatibility issue , reason is the 64bits OS. Beside, I have a lot applications installed on my Tiger, and I have projects need to be done, I can't afford spending my time to clean install my Mac to Leopard and re-install all my applications, too much time taken. After a smooth upgrade I done for my fellow friend &lt;a href="" /&gt;Hong Kiat&lt;/a&gt;, then only I tried out on my mac book.
&lt;/p&gt;
&lt;p&gt;
After the upgrade, there are 2 installations of Ruby on Rails development kits, the first installation is from the carried over from &lt;a href="http://rubify.com/2007/1/2/full-ruby-on-rails-installation-on-mac-intel"&gt;Tiger&lt;/a&gt;, and the second one is from Leopard default. So there are 2 locations of Ruby on Rails Installation which is "/usr/local" because all my installation earlier is prefix to that location, and default leopard location can be found on "/usr/bin".
&lt;/p&gt;
&lt;pre&gt;
rubify:~ chardy$ which ruby
/usr/local/bin/ruby

rubify:~ chardy$ ruby -v
ruby 1.8.5 (2007-03-13 patchlevel 35) [i686-darwin8.9.1]

rubify:~ chardy$ rails -v
Rails 1.2.5

rubify:~ chardy$ /usr/bin/ruby -v
ruby 1.8.6 (2007-06-07 patchlevel 36) [universal-darwin9.0]

rubify:~ chardy$ /usr/bin/rails -v
Rails 1.2.3

&lt;/pre&gt;
&lt;p&gt;
And after the upgrade I found out, all my worry earlier can be easily solved, and I forgotten UNIX system can be set the environment, so I just point all my earlier Tiger environment to Leopard. Just copy modified ~/.profile file like below to point all my installation to /usr/local/bin. I still using ruby 1.8.5 for current development.
&lt;/p&gt;
&lt;pre&gt;

PATH="/bin:/sbin:/usr/bin:/usr/sbin"

export PATH="$PATH:$HOME/bin"
export PATH="/usr/local/bin:/usr/local/sbin:$PATH"
export MANPATH="/usr/local/man:$MANPATH"
export PATH="$PATH:/usr/local/mysql/bin"

&lt;/pre&gt;
&lt;p&gt;
I have encountered this problem when load the terminal. 
&lt;/p&gt;
&lt;pre&gt;

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
     LC_ALL = "En_US",
     LANG = (unset)
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

&lt;/pre&gt;
&lt;p&gt;
Then I inputed below to my ~/profile again:
&lt;/p&gt;
&lt;pre&gt;

# This setting is for the new UTF-8 terminal support
export LC_CTYPE=en_US.UTF-8
export LC_ALL=en_US.UTF-8

&lt;/pre&gt;
&lt;p&gt;
And since I still use macport, I also added &lt;code&gt;export PATH=/opt/local/bin:/opt/local/sbin:$PATH&lt;/code&gt; to ~/.profile
&lt;/p&gt;

&lt;p&gt;
So, you can do upgrade to new Leopard operating system without a lot of worry. Just insert the DVD and upgrade. All other installation is taken care. Just restore your existing profile setting. Then roll it out :-) FYI, Leopard comes with both Apache 2.2 and 1.3, default on the Sharing control panel is boot up Apache 2.2. Have fun!
&lt;/p&gt;

&lt;p&gt;
Watch out Hivelogic for his new articles about installation &lt;a href="http://hivelogic.com/narrative/articles/installing-rails-on-leopard-article-coming-soon"&gt;rails on leopard&lt;/a&gt;.
&lt;/p&gt;
          </content>  <feedburner:origLink>http://rubify.com/2007/10/28/rails-and-leopard-a-smooth-upgrade</feedburner:origLink></entry>
  <entry xml:base="http://rubify.com/">
    <author>
      <name>chardy</name>
    </author>
    <id>tag:rubify.com,2007-09-10:147</id>
    <published>2007-09-10T03:40:00Z</published>
    <updated>2007-09-11T03:51:47Z</updated>
    <category term="Projects" />
    <link href="http://feedproxy.google.com/~r/Rubify/~3/Wi4eJNpa6QI/rails-rumbles-just-ended" rel="alternate" type="text/html" />
    <title>Rails Rumbles Just Ended</title>
<content type="html">
            &lt;p&gt;48 hours &lt;a href="http://www.railsrumble.com"&gt;coding competition&lt;/a&gt; already over, I have produced an application, Please vote for me on wednesday :)&lt;/p&gt;


	&lt;p&gt;&lt;img src="http://rubify.com/assets/2007/9/11/railsrumble_black_120.png" alt="" /&gt;&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://vote.railsrumble.com/teams/pingmilk/visit"&gt;&lt;img src="http://rubify.com/assets/2007/9/11/vote.png" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;&lt;span class="caps"&gt;FOR&lt;/span&gt;&lt;/p&gt;


	&lt;p&gt;&lt;img src="http://rubify.com/assets/2007/9/11/pingmilkEvo.png" alt="" /&gt;&lt;/p&gt;
          </content>  <feedburner:origLink>http://rubify.com/2007/9/10/rails-rumbles-just-ended</feedburner:origLink></entry>
  <entry xml:base="http://rubify.com/">
    <author>
      <name>chardy</name>
    </author>
    <id>tag:rubify.com,2007-07-29:145</id>
    <published>2007-07-29T05:12:00Z</published>
    <updated>2007-07-29T05:16:18Z</updated>
    <category term="Personal" />
    <category term="personal" />
    <link href="http://feedproxy.google.com/~r/Rubify/~3/XLeC6h17Bfw/recently-i-addicted-to-blogging" rel="alternate" type="text/html" />
    <title>Recently, I addicted to blogging..</title>
<content type="html">
            Yes, and its getting it to me, I am addicted to blogging, I write about technicals, my story, interest in multiple blog site. Part of my life is blogging now, virtually attached to the world, even the company where I work started their &lt;a href="http://www.spiragram.com"&gt;corporate website&lt;/a&gt; as a blogging site, I gotta blog more and more. &lt;br /&gt;&lt;br /&gt;

&lt;a href="http://mingle2.com/blog-addiction"&gt;71%&lt;span&gt;How Addicted to Blogging Are You?&lt;/span&gt;&lt;/a&gt;
          </content>  <feedburner:origLink>http://rubify.com/2007/7/29/recently-i-addicted-to-blogging</feedburner:origLink></entry>
  <entry xml:base="http://rubify.com/">
    <author>
      <name>chardy</name>
    </author>
    <id>tag:rubify.com,2007-07-25:144</id>
    <published>2007-07-25T09:35:00Z</published>
    <updated>2007-07-25T09:39:17Z</updated>
    <category term="Sitenotes" />
    <link href="http://feedproxy.google.com/~r/Rubify/~3/rQqiWL_eBik/ruby-one-click-installer-for-mac-osx-tiger" rel="alternate" type="text/html" />
    <title>Ruby one click installer for mac OSX Tiger</title>
<content type="html">
            &lt;p&gt;Once upon a time when I still use windows laptop as my workstation, I used to know there is a Ruby &lt;a href="http://rubyforge.org/projects/rubyinstaller/"&gt;One click Installer&lt;/a&gt; for Windows. Just notice, another one click installer for mac is born. Visit &lt;a href="http://rubyosx.rubyforge.org/"&gt;http://rubyosx.rubyforge.org/&lt;/a&gt; to download.&lt;/p&gt;


	&lt;p&gt;&lt;img src="http://blog.spiragram.com/assets/2007/7/25/ruby_on_click_installer.png" alt="" /&gt;&lt;/p&gt;


	&lt;p&gt;The good things are this package help to install basic framework to get you started with Ruby on Rails, It done the installation in &lt;span class="caps"&gt;UNIX&lt;/span&gt; way, which installed everything on /usr/local and it replaces the broken Readline library, updates to a current version of SQLite3 and prepares your &lt;span class="caps"&gt;OSX&lt;/span&gt; for Rails, which needs at least Ruby 1.8.4 to run.&lt;/p&gt;


	&lt;p&gt;After, do not forget to set your environment for /usr/local path.&lt;/p&gt;


&lt;pre&gt;
export PATH="/usr/local/bin:/usr/local/sbin:$PATH" 
&lt;/pre&gt;

	&lt;p&gt;But if you still prefer the Terminal way to install Ruby on Rails framework on &lt;span class="caps"&gt;OSX&lt;/span&gt;, I have fews good links below: (Just stick to these links, you will be fine)&lt;/p&gt;


	&lt;ol&gt;
	&lt;li&gt;&lt;a href="http://hivelogic.com/narrative/articles/ruby-rails-mongrel-mysql-osx"&gt;Hivelogic Guide&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://nubyonrails.com/articles/2005/12/29/an-even-better-way-to-build-ruby-rails-lighttpd-and-mysql-on-tiger"&gt;NubyonRails Guide&lt;/a&gt;&lt;/li&gt;
	&lt;/ol&gt;
          </content>  <feedburner:origLink>http://rubify.com/2007/7/25/ruby-one-click-installer-for-mac-osx-tiger</feedburner:origLink></entry>
  <entry xml:base="http://rubify.com/">
    <author>
      <name>chardy</name>
    </author>
    <id>tag:rubify.com,2007-07-11:135</id>
    <published>2007-07-11T10:21:00Z</published>
    <updated>2007-07-11T10:30:50Z</updated>
    <link href="http://feedproxy.google.com/~r/Rubify/~3/law596JbPXI/install-gem-in-local-user-directory-for-back-up-purpose" rel="alternate" type="text/html" />
    <title>Install Gem in Local User Directory for Back Up Purpose</title>
<content type="html">
            &lt;p&gt;It seems not maintainable when we have too many gems installed on your local machine gem repositories, indeed in UNIX machine, our access is granted by user group itself. How if one day, my harddisk crashes and I loss all my data, BTW, I only backup my home folder in this case. So due to this incident, I need to reinstall all my ruby gems again to get Ruby on Rails development environment ready to use. Too much work. &lt;br /&gt;&lt;br /&gt;

Try this to solve the issue, by installing all your gem inside you home folder.
&lt;/p&gt;

&lt;pre&gt;
$ cd ~
$ mkdir .gem
$ export GEM_PATH=~/.gem
$ gem install -i ~/.gem haml
&lt;/pre&gt;

&lt;p&gt;
You can also put this &lt;code&gt;export GEM_PATH=~/.gem&lt;/code&gt; to your ~/.profile or ~/.bash_profile. &lt;br /&gt;
Whats the .gem directory look like:
&lt;/p&gt;

&lt;pre&gt;
$ ls ~/.gem
./  ../  bin/  cache/  doc/  gems/  source_cache  specifications/
&lt;/pre&gt;
          </content>  <feedburner:origLink>http://rubify.com/2007/7/11/install-gem-in-local-user-directory-for-back-up-purpose</feedburner:origLink></entry>
  <entry xml:base="http://rubify.com/">
    <author>
      <name>chardy</name>
    </author>
    <id>tag:rubify.com,2007-07-09:133</id>
    <published>2007-07-09T03:00:00Z</published>
    <updated>2007-07-11T06:08:21Z</updated>
    <link href="http://feedproxy.google.com/~r/Rubify/~3/MTBRlNvuM3k/angry-and-piss-off" rel="alternate" type="text/html" />
    <title>No More Angry but Piss Off</title>
<content type="html">
            &lt;img src="http://www.gapingvoid.com/justbecause2223-thumb.jpg" height="216" alt="justbecause2223.jpg" width="400"&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;p&gt;
It's always going to be true. No matter what (who) she/him is.
&lt;/p&gt;
          </content>  <feedburner:origLink>http://rubify.com/2007/7/9/angry-and-piss-off</feedburner:origLink></entry>
  <entry xml:base="http://rubify.com/">
    <author>
      <name>chardy</name>
    </author>
    <id>tag:rubify.com,2007-07-04:132</id>
    <published>2007-07-04T07:33:00Z</published>
    <updated>2007-07-04T07:42:49Z</updated>
    <category term="Rails Mac" />
    <link href="http://feedproxy.google.com/~r/Rubify/~3/GtwpUp9GcV8/colorize-your-terminal-logging" rel="alternate" type="text/html" />
    <title>Colorize your terminal logging.</title>
<content type="html">
            &lt;p&gt;When you running your rails application via mongrel or lighttpd by using script/console command in development mode, you can see the terminal logging running in colorize mode, come to an idea to creating the same logging output for some of my background process. Do you know what is actually made up the color on the terminal? Basically it just special character code to color the terminal, and every terminal application have slight different implementation. Last time I was playing around with hyper terminal application and found this, then implement this on mac terminal.
&lt;/p&gt;

&lt;p&gt;
I have make a simple method to do this for ruby programming language:
&lt;/p&gt;

&lt;pre&gt;

# usage: 
# format_log("This is log message", {:background =&gt; "red", :foreground =&gt; "white", :special =&gt; "reset"})
#

def format_log(str, params)   
    specials = {
        "reset" =&gt; 0,
        "bold" =&gt; 1,
        "half-bright" =&gt; 2,
        "underscore" =&gt; 4,
        "blink" =&gt; 5,
        "reverse" =&gt; 7,
        "normal-bright" =&gt; 22,
        "no-underline" =&gt; 24,
        "blink" =&gt; 25,
        "no-reverse" =&gt; 27
    }
    foregrounds = {
        "black" =&gt; 30,
        "red" =&gt; 31,
        "green" =&gt; 32,
        "black" =&gt; 30,
        "red" =&gt; 31,
        "green" =&gt; 32,
        "brown" =&gt; 33,
        "blue" =&gt; 34,
        "magenta" =&gt; 35,
        "cyan" =&gt; 36,
        "white" =&gt; 37
    }
    
    backgrounds = {
        "black" =&gt; 40,
        "red" =&gt; 41,
        "green" =&gt; 42,
        "brown" =&gt; 43,
        "blue" =&gt; 44,
        "magenta" =&gt; 45,
        "cyan" =&gt; 46,
        "white" =&gt; 47,
        "default" =&gt; 49
    }
    
    puts "\033[#{backgrounds[params[:background]]};#{foregrounds[params[:foreground]]}m #{str} \033[#{specials[params[:special]]}m"

end

&lt;/pre&gt;
&lt;p&gt;
Sample below:
&lt;/p&gt;
&lt;img src="http://blog.spiragram.com/assets/2007/7/4/Picture_1.png" /&gt;

&lt;p&gt;
It tested on mac terminal, not sure whether is running on others. When free, I will make this tiny little helper to become a more mature plugin :-)
&lt;/p&gt;
          </content>  <feedburner:origLink>http://rubify.com/2007/7/4/colorize-your-terminal-logging</feedburner:origLink></entry>
  <entry xml:base="http://rubify.com/">
    <author>
      <name>chardy</name>
    </author>
    <id>tag:rubify.com,2007-07-04:131</id>
    <published>2007-07-04T07:32:00Z</published>
    <updated>2007-07-04T07:33:04Z</updated>
    <category term="Rails" />
    <link href="http://feedproxy.google.com/~r/Rubify/~3/4cnWAG4uibQ/rake-tutorial" rel="alternate" type="text/html" />
    <title>Rake Tutorial</title>
<content type="html">
            &lt;p&gt;Nice &lt;a href="http://www.railsenvy.com/2007/6/11/ruby-on-rails-rake-tutorial"&gt;introductory tutorial on Rake&lt;/a&gt; from the guys @ &lt;a href="http://www.railsenvy.com/"&gt;Rails Envy&lt;/a&gt;, which provides a brief history, introduces concepts such as tasks and namespaces and talks about its role within Rails.&lt;/p&gt;
          </content>  <feedburner:origLink>http://rubify.com/2007/7/4/rake-tutorial</feedburner:origLink></entry>
  <entry xml:base="http://rubify.com/">
    <author>
      <name>chardy</name>
    </author>
    <id>tag:rubify.com,2007-05-27:130</id>
    <published>2007-05-27T10:00:00Z</published>
    <updated>2007-05-27T10:01:09Z</updated>
    <category term="RubyOnRails Java" />
    <link href="http://feedproxy.google.com/~r/Rubify/~3/93csEjyxW98/ruby-on-rails-and-java" rel="alternate" type="text/html" />
    <title>Ruby on Rails and Java</title>
<content type="html">
            &lt;p&gt;&amp;lt;object height="350" width="425"&gt;&amp;lt;param&gt;&amp;lt;param&gt;&amp;lt;embed src="http://www.youtube.com/v/PQbuyKUaKFo" height="350" width="425"&gt;&amp;lt;/object&gt;&lt;/p&gt;
          </content>  <feedburner:origLink>http://rubify.com/2007/5/27/ruby-on-rails-and-java</feedburner:origLink></entry>
  <entry xml:base="http://rubify.com/">
    <author>
      <name>chardy</name>
    </author>
    <id>tag:rubify.com,2007-05-27:129</id>
    <published>2007-05-27T07:26:00Z</published>
    <updated>2007-05-27T08:01:59Z</updated>
    <category term="RubyOnRails" />
    <link href="http://feedproxy.google.com/~r/Rubify/~3/0xeUGQZMGCg/back-from-rails-conf-2007" rel="alternate" type="text/html" />
    <title>Back From Rails Conf 2007</title>
<content type="html">
            &lt;p&gt;
Back to Singapore again at 25th May 2007. Having jet lag, and get myself a good rest after that. The trip was awesome, this is my first time to travel so far. Really truly aspiring that Railsconf 2007 attendee reach 1600 people, prove that Rails Community grow rate is high. Chad Fowler bring the message about community, a call to community which every one working together, support and bring up the Rails community.
&lt;/p&gt;
&lt;p&gt;
Chad introduced David to talk about Rails 2.0. According to DHH, "Rails 2.0 is not a beautiful unicorn, won't solve all your problems, and it is real. I think to myself, okay need to shoot for The Rails Way being about 2.0, perhaps even the first Rails 2.0 book? The timing might be perfect."
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;David's 9 things I love about Rails 2:&lt;/strong&gt;
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Breakpoints are back AND drop-in debugging is now supported! The debugging console pops up right in the Mongrel process. Looks really good and powerful. David says, "Kent Sibilev deserves a world of thanks for getting this to work.&lt;/li&gt;
&lt;li&gt;HTTP performance improvements. The _include_tags now have a :cache=&gt;true option that combines JS and CSS files together and gzips them to drastically improve performance.&lt;/li&gt;
&lt;li&gt;ActiveRecord QueryCache. Caches queries that have already been executed for performance boost.&lt;/li&gt;
&lt;li&gt;Renderers and mime types not conflated in the naming of the view templates anymore. (Refers to the new .erb and .builder extensions), Javascript and CSS packaging and zipping.&lt;/li&gt;
&lt;li&gt;Better config and initializer directory structure cleans up the mess of environment.rb&lt;/li&gt;
&lt;li&gt;Sexy migrations! Big improvement in the syntax of migration files and an example of a 3rd party plugin making it into core very quickly.&lt;/li&gt;
&lt;li&gt;Much better HTTP authentication support baked in.&lt;/li&gt;
&lt;li&gt;MIT license assumed now. Plugin generator script adds the MIT license by default.&lt;/li&gt;
&lt;li&gt;Spring cleaning. Improvements to basic Rails code and lots of 1.2 deprecations being moved out completely now.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;
    ____        _ __        _         __                  
   / __ \____ _(_) /____   (_)____   / /   ____ _   _____ 
  / /_/ / __ `/ / / ___/  / / ___/  / /   / __ \ | / / _ \
 / _, _/ /_/ / / (__  )  / (__  )  / /___/ /_/ / |/ /  __/
/_/ |_|\__,_/_/_/____/  /_/____/  /_____/\____/|___/\___/ 
                                                          
&lt;/pre&gt;
&lt;img src="http://pragdave.pragprog.com/pragdave/images/2007/05/20/rails_logo_heart.png" /&gt;
&lt;p&gt;
Meanwhile, I plan to blog about my thought about the RailsConf 2007 session content which I attending. 
&lt;/p&gt;
          </content>  <feedburner:origLink>http://rubify.com/2007/5/27/back-from-rails-conf-2007</feedburner:origLink></entry>
  <entry xml:base="http://rubify.com/">
    <author>
      <name>chardy</name>
    </author>
    <id>tag:rubify.com,2007-04-27:128</id>
    <published>2007-04-27T02:41:00Z</published>
    <updated>2007-04-27T02:45:54Z</updated>
    <category term="IE" />
    <link href="http://feedproxy.google.com/~r/Rubify/~3/QlMmRvQMeOw/web-developer-tool-on-ie" rel="alternate" type="text/html" />
    <title>Web Developer Tool on IE</title>
<content type="html">
            &lt;p&gt;Thereâ�?��?�s a toolbar for Internet Explorer that has many of the same features as &lt;a href="http://www.getfirebug.com/"&gt;Firebug &lt;/a&gt;for  Firefox.&lt;br&gt;
Visit &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=e59c3964-672d-4511-bb3e-2d5e1db91038&amp;amp;amp;displaylang=en"&gt;here&lt;/a&gt; to get a copy of the current beta. &lt;/p&gt;
&lt;p&gt;To launch it, start IE7 and go to Tools -&amp;gt; Toolbars -&amp;gt; Explorer Bar -&amp;gt; IE DOM explorer.&lt;/p&gt;

&lt;p&gt;You can inspect the DOM, the HTML elements, the CSS, and many more stuffs.&lt;/p&gt;

&lt;p&gt;NB: I am using Windows XP via &lt;a href="http://www.parallels.com/"&gt;Parallels Virtual Machine.&lt;/a&gt;&lt;/p&gt;
          </content>  <feedburner:origLink>http://rubify.com/2007/4/27/web-developer-tool-on-ie</feedburner:origLink></entry>
  <entry xml:base="http://rubify.com/">
    <author>
      <name>chardy</name>
    </author>
    <id>tag:rubify.com,2007-03-02:112</id>
    <published>2007-03-02T02:09:00Z</published>
    <updated>2007-03-02T03:39:00Z</updated>
    <category term="Mac" />
    <link href="http://feedproxy.google.com/~r/Rubify/~3/gCA9cFCKWic/faster-your-mail-app" rel="alternate" type="text/html" />
    <title>Faster your mail.app</title>
<content type="html">
            macOSXHints &lt;a href="http://www.macosxhints.com/article.php?story=2006013009291731"&gt;explains&lt;/a&gt; how his database stored phantom messages from an Exchange server he used over Summer. By quitting Mail application, dragging the Envelope Index folder to the Desktop, restarting Mail and allowing it to reindex his emails, cut its size from 200MB to 2MB. After, the Mail.app will definetely increase. Rob Griffiths reduced his from 25.9MB to 4.5MB. &lt;br /&gt; There is still another way to do it, using sqlite3 command.
&lt;br /&gt;
How to do it?&lt;br /&gt;
1. Quit your Mail.app&lt;br /&gt;
2. Open Terminal.&lt;br /&gt;
3. Type the following:&lt;br /&gt;
&lt;pre&gt;

rubify:~$ cd ~/Library/Mail
rubify:~/Library/Mail chardy$ sqlite3 Envelope\ Index
rubify:~/Library/Mail chardy$ sqlite&gt; vacuum subjects;

&lt;/pre&gt;
When the sqlite prompt returns, type Control-D to exit. Restart Mail and enjoy the extra speed. I reduced from 37.5MB of "Envelope Index" folder to 4.4MB . Quite cool. &lt;br /&gt;
&lt;pre&gt;

rubify:~/Library/Mail chardy$ du -hs Envelope\ Index 
4.4M    Envelope Index

&lt;/pre&gt;
&lt;br /&gt;
Cheer.
          </content>  <feedburner:origLink>http://rubify.com/2007/3/2/faster-your-mail-app</feedburner:origLink></entry>
  <entry xml:base="http://rubify.com/">
    <author>
      <name>chardy</name>
    </author>
    <id>tag:rubify.com,2007-02-25:111</id>
    <published>2007-02-25T08:18:00Z</published>
    <updated>2007-02-25T12:20:18Z</updated>
    <category term="Articles" />
    <category term="RubyOnRails Ruby" />
    <link href="http://feedproxy.google.com/~r/Rubify/~3/13lhcD5llE4/chunked-array" rel="alternate" type="text/html" />
    <title>Chunked Array</title>
<content type="html">
            Split an array of elements into a set of smaller arrays of equal size. Extra elements are preferentially assigned to earlier arrays. If there are no elements in a given returned array it will be [] (empty array) 
&lt;br /&gt;&lt;br /&gt;
&lt;pre&gt;
# use as standalone function 
def chunk_array(array, pieces=2) 
len = array.length; 
mid = (len/pieces) 
chunks = [] 
start = 0 
1.upto(pieces) do |i| 
last = start+mid 
last = last-1 unless len%pieces &gt;= i 
chunks &amp;lt;&amp;lt; array[start..last] || [] 
start = last+1 
end 
chunks 
end 

# use as array.chunk 
class Array 
def chunk(pieces=2) 
len = self.length; 
mid = (len/pieces) 
chunks = [] 
start = 0 
1.upto(pieces) do |i| 
last = start+mid 
last = last-1 unless len%pieces &gt;= i 
chunks &amp;lt;&amp;lt; self[start..last] || [] 
start = last+1 
end 
chunks 
end 
end 

&lt;/pre&gt;
          </content>  <feedburner:origLink>http://rubify.com/2007/2/25/chunked-array</feedburner:origLink></entry>
</feed>
