Nice made on-line classic – www.railthello.com. Of course – powered by Rails.
Currently I’m on few days of vacation, with very limited net access, but I’m learning a lot about Ruby on Rails… I’m astonished ;-)) In few days I will show my first project on rails…
Some time ago I wrote about bad NTP implementation in D-Link products (http://nhw.pl/blg/archives/2006/04/10/T11_08_49/). It looks like today PHK and D-Link have settled. Continue reading
Hmmmm, it looks like my estimate (http://nhw.pl/wp/2006/04/compact-ruby-code/) was wrong.
wc -l rbckp.rb
or even more interesting:
grep -v ^$ rbckp.rb |wc -l
grep -v ^$ BACKUP.sh | wc -l
For those not familiar with grep syntax – using -v ^$ filters and shows all not empty lines (for such query line with whitespaces only is not empty).
And basically both scripts does similar work (even if not identical). I like Ruby…
It is often written, that Ruby programs are small. Not in sense of making small things, but than they are compact. I’ve heard that many times. But this time I’ve rewrote my backup script.
What it does? It backups set of directories with tar and dumps mysql databases into some directory. After that I can rsync it to backup host.
Old script was written in shell (bash to be exact) and new one in Ruby. Results are as follow:
# wc -l BACKUP.sh
# wc -l rbckp.rb
Is there some difference, can You spot it? :-)) To be honest script does a bit more, and I suppose that exact Ruby copy would have something about 60 lines… Tomorrow I will finish it and see whether my estimate is right.
First a bit of background. “Sprawa polska” it can be translated as “polish issue”. When You know polish history, than You know in 18th and 19th century Poland was not present as an independent country. We tried a lot to get our independence back, so Poles were present in every history stir at those times. And when You were growing here, Your history book covered every topic in context “sprawy polskiej”.
But what it have common with Ruby On Rails???