Posts

Showing posts with the label tools

Stress Testing with Siege and Bombard, know your limits

Image
I couldn't find a clear quick intro on getting siege and bombard in action, so I'm writing one here. Siege is a load testing and benchmarking utility that has been available for quite a while, It allows you to hit your web application on a specific url (or a set of urls in a file) with specific concurrency and size settings.  siege summarizes the measures of the test outcome including: Transaction rate (requests/sec) Actual concurrency (even if you hit with 200 concurrent connections, your server might be responding with just 80) Average, longest and shortest response time example: triggering 200 concurrent users, each hitting the url twice siege -c200 -r2 http://www.modsaid.com/ summary: Transactions:         400 hits Availability:      100.00 % Elapsed time:       38.44 secs Data transferred:        0.26 MB Response time:       10.09 secs Tra...

Ruby script for downloading rails casts

Ryan Bates continuously provide useful Rails tips in this railscasts.com . I had written a bash script for downloading the videos of the episodes in the past. I do not like streaming much and I'd rather keep the episodes for reference. One downside of the script is that I had to check the rss feed or the website for new episodes, and run the script manually passing the correct paramters (start and end of episode ids to be downloaded) Now I decided to get rid of the silly step. so I ported my script to ruby, and it runs down to download whatever episodes are missing using the rss feed and checking what is already present. The script uses simple-rss gem, so you'll have to get that installed. It also uses wget for downloading. I didn't bother using net/http of ruby, wget is fine for me as a linux user. The script flow is simple: Check the current files in the download directory (collecting information) Grab the rss of railscasts.com Iterate over rs...

Presenting NeverBlcok in rubykaigi 2009

Mohammad Ali's presentation of NeverBlock .

Patron: a Ruby HTTP client library

I was just trying out Patron , the new ruby client library, by Phillip Toland . Patron is based on libcurl. and providing nice usable interface, which allows you to make http requests easily and with as much customization as you need. Let us take a quick usage sample here: irb(main):036:0> require 'rubygems' => false irb(main):037:0> require 'patron' => false irb(main):038:0> sess = Patron::Session.new => #<Patron::Session:0xb7a9f878> irb(main):039:0> sess.base_url = "http://www.google.com" => "http://www.google.com" irb(main):040:0> resp = sess.get("/intl/en/about.html") => #<Patron::Response @status_line='HTTP/1.0 200 OK'> irb(main):041:0> puts resp.body Checkout the documentation for more samples and usage notes.

goosh.org The unofficial google shell

As a linux user, I spend most of my time using the shell to do most of the work. I am a command line fan like a lot of people out there. goosh.org is a command line based (Ajax web based) interface for google, created by Stefan Grothkopp . You just write your search query and the results will be listed for you in a very similar manner to command line programs. Searching using goosh will still need you to use your mouse to open the results and continue browsing. Not a very suitable shell mode. Well, this haven't been the main usage of goosh (for me). Instead, I have been using it heavily as my translator. Instead of: Going to http://translate.google.com/ in the browser Writing the text to be translated Choosing the from/to languages from the drop down lists Clicking "Translate" Goosh lets you get this by: Going to goosh.org typing the command following command and hitting Enter translate src dst sentence for example: translate en ar my name is mahmoud to get "اسمي...

Adding files to svn:ignore through command line

Recently, I have been making most SVN operations through command line. I find it more powerful, robust and surprisingly easy to use in basic operations. svn update svn status svn commit file1 file2 file3 -m 'message describing the updates' One of the things that i couldn't do at first is to mark items to be ignored. I finally realized how to do this.a directory under version control has several properties that can be set to describe the files in that directory. our property of concern is svn:ignore. We can ignore files by editing the svn:ignore property of the containing directory. svn propedit svn:ignore . This will open an editor allowing you to write the names of the files to be ignored. then saving and committing the directory. Note that the last parameter "." means the working directory. You can set you favourite text editor to be used in this operation by setting the environment variale export SVN_EDITOR=vim #OR export SVN_EDITOR=gedit You can find more deta...

Firebug on Firefox 3.0b4

i had installed the beta firefox 3 . it seems nice.. and less starving for memory so far (the thing i really hated in FF). One issue i had is that most addons aren't yet compatible with the new FireFox. including firebug . As a Web Developer, i cannot imagine being with no FireBug available. Firefox 3 couldn't not find a compatible update. and when u search for the addon manually on mozilla addons . u get the old one that is compatible with FF2. Fortunately. i was able to locate FireBug 1.1 beta that is compatible with FireFox 3. i guess it was not added to the addons list because it is still a beta...

find a website value with dnScoop

I came across dnScoop , an online tool to determine the estimated value of a website depending on several factors. Factors include Domain Age, Page Rank, Inbound Links, Traffic Rank and others. The power of dnScoop is that it interacts with several other domain lookup tools out there. u only need to provide the domain that you are interested in. unlike other website value calculators like websitebroker calculator and glurk that requires u to enter some data (monthly traffic, and Alexa Page Rank,....) according to dnScoop this is the estimated value for some websites www.yahoo.com worth $1,884,000,000 www.google.com worth $1,740,000,000 www.sun.com worth $29,056,000 (22 years old) www.facebook.com worth $263,900,000 www.microsoft.com worth $397,440,000 www.cnn.com worth $29,440,000 www.masrawy.com worth $96,900 (8 years old)