Posts

Showing posts from June, 2008

Advanced Configuration in Firefox 3

Image
Everyone can customize a lot of options in Firefox through the "Tools>Options" or "Edit>Preferences" menus. Well the other way is to make customizations through the advanced configuration interface by typing "about:config" in the address bar. You will see the interesting warning message. well, just be careful while you are about changing values. Here you can make a lot of configurations like: browser.download.manager.closeWhenDone set it to true to automatically close the download window when the download is complete browser.download.dir sets your download directory browser.urlbar.maxRichResults sets the number of suggested URLs that appear when you start typing in the address bar zoom.maxPercent and zoom.minPercent to alter the maximum and minimum limits of zooming You can find some configurations explained at ghacks , eriwen's blog and many other locations online. most configurations are self explanatory though. Using the advanced config

Downloading Rails Casts

Rails casts is hosting Ruby on Rails video tutorials. It explains a lot of tips for development and how different rails components work. I highly recommend it for rails starters. I wanted to download all the previous episodes, that needed me to open the page of each episode, find the link for the mov file, and click save as. So i created a bash script to visit the links of the episodes and do the job automatically get_rails_casts.sh: #!/bin/bash for ((i=$1;i<=$2;i+=1)); do wget http://railscasts.com/episodes/$i -O- | grep -oi 'http://media.railscasts.com/videos/[a-z_0-9]*.mov' >> links done while read LINE ; do wget "$LINE" ; done < links Now the script can be used to download any range of episodes. below i'm calling it to download episodes from the episode #1 to episode #115 ./get_rails_casts.sh 1 115

Setting Up RubyOnRails Development Environment on Ubuntu 8.04 Hardy

I started a new fresh installation of Ubuntu 8.04 (Hardy).. i needed to prepare my machine for RubyOnRails development. Below are the steps i need to make: Installing Ruby, Rails, MySQL Install MySQL apt-get install mysql-server mysql-client Install Ruby (1.8.6) and gems apt-get install build-essential ruby irb rdoc ri ruby1.8-dev libzlib-ruby libopenssl-ruby1.8 rubygems libmysql-ruby1.8 Update gem gem update --system rm /usr/bin/gem ln -s /usr/bin/gem1.8 /usr/bin/gem Install Rails & Mongrels gem install rails mongrel mongrel_cluster Installing rails 1.2.5 (needed in my project) gem install rails -v 1.2.5 --include-dependencies Move the mongrel_rails, rails and rake to the /bin directory ln -s /var/lib/gems/1.8/bin/mongrel_rails /bin/ ln -s /var/lib/gems/1.8/bin/rake /bin/ ln -s /var/lib/gems/1.8/bin/rails /bin/ This makes us done with the basic ruby and rails installation. Installing RMagick Rmagick is an image processing library that is needed by some rails projects (including m

Heads Up With Radiant CMS

Radiant is an open source RubyOnRails based Content Management System, designed for relatively small websites. One of the nice things about radiant is that it the templates themselves are stored in the database like ordinary content, making all interactions with the site once it is deployed through the administration interface. In radiant, a page can be composed of several named parts. Parts of the interface that is shared among several layouts (like navigation bar, footer, header) can be stored in snippents . Using snippets, layouts and page parts helps the site creators to elegantly build and maintain their website. Some features that is beyond a CMS, like having a page that sends emails or a form that stores data somewhere, can be obtained through radiant extensions . let's start a new radiant project: first you need to install the radiant gem gem install radiant --include-dependencies then create a new radiant project specifying the database engine used. radiant --database m