Posts

Migrating repos from SVN to git

It is straight forward to migrate your old SVN code to git. I highly advice everyone to do that even if they're not going to publish it on github or actually use it. but backing up a git repo can get to be very handy. Thanks to  Kevin Menard  for his   svn2git , the migration can be very straight forward.  I have created a usage repo,  using-svn2git , to speed things by adding it to Gemfile and using a specific rvm gemset, assuming you are using rvm. to make it as simple as: git clone bundle install start the migration... Of course having the standard SVN repo structure will save you a lot. You will probably only have to maintain the proper author.txt mapping file between svn and git users (example of the file is in the repo). I have tried to keep the  readme  short and to the point. I hope you find it useful. Regards

Writing usable scripts in Ruby

Usable command line tools/scripts There are a lot of command line tools written in ruby, python, bash, c or any other languages. They are usable simply because there is a standard way in dealing with them this way can be summarized in the following points: There has to be a usage example/brief help at the finger tips of the user ( by running with  -- help      or -h) arguments should have default values which are explained in the help misusage or missing mandatory arguments should fire the help message ruby tools OptionParser  is part of the standard library in ruby that takes care of this script packaging.  they show long and short examples This is an example of the script: require 'optparse' options = {} OptionParser.new do |opts| opts.banner = "Usage: script_name.rb [options]" opts.on("-v", "--[no-]verbose", "Run verbosely") do |v|   options[:verbose] = v end end.parse! p options p ARGV # Actual script co...

Success of Startups

Entrepreneurship has become one of the one of the most interesting topic in the business side in any country in the world. While it is digging its way in the middle east, there is some sort of confusion and a lot of aspects related to that topic. A Startup can act and advance to tackle business opportunities in a way that competes with large enterprises. and most of the times, they need to be supported by Investors to back them up. One of the things that started to really bother me in the culture is the definition of success of a startup. No one denies that a decent revenue generating startup is a successful one. However, some people believe that just raising an investment is a success.... umm, debatable. I believe we can make some kind of analogy with some entities that showed up in the past decade like biznas and skybiz (I'm sure some of you will remember those names).   they used an invalid scheme summarized as: People can register and join the network for a fee (as an i...

Utilizing Page Caching while using query string parameters using Nginx

One of the common practices for ruby on rails developers is to wrap all parameters in the URI itself, so they can easily make use of page caching. Sometimes having a lot of parameters can start being confusing specially with the ordering of the parameters to match the defined routes. Let's elaborate with an example. Consider an API that provides a list of entries, with possible filters: http://api.example.com/feed.json This can simply be page cached, rails will place the proper feed.json file in the public directory. If we wanted to add use some supported filters like: date (in the format of 2012-03-25) order (by date, score or relevance) page (used to get the next pages of the feed) limit (or the page size.. the expected number of entries per response) type (some app related filter. let's assume the values can be: post, comment, announcement) If we used the simply form of http://api.example.com/feed.json?date=2012-03-25&page=2&limit=20&type=comment&order=score ...

Cuban Pete

Image
They call me Cuban Pete I'm the King of the Rumba beat When I play the marracas I go chick-chicky-boom chick-chicky-boom Yes, Sir, I'm Cuban Pete I'm the craze of my native street when I start to dance everything goes chick-chicky-boom chick-chicky-boom There Senoritas they sing and how they swing with this rumbero it's very nice so full of spice and when they dance and they bring a happy ring of vaqueros singing a song all the day long So if you like the beat take a lesson from Cuban Pete and I'll teach you to chick-chicky-boom chick-chicky-boom chick-chicky-boom Si, Senorita, I know that you will like the chicky boom chick 'cause it's the dance of Latin romance and Cuban Pete doesn't teach you in a hurry like Arthur Murray I come from Havanah and there's always manana * * * They call me Sally Sweet I'm the Queen of Delancy Street When I start to dance everything goes chick-chicky-boom chick-chicky-boom Excuse me Mister Pete have the Cub...

Media and Advertising panel in ArabNetCairo

Image
One of the most interesting panel discussions in ArabNetCairo was about Media & Advertising. The speakers were: Fawzi Rahal: Founder of The Next Web Middle East and Regional Digital Director at Grey in the Middle East and North Africa. Waseem El Tanahi: Founder & CEO, MediaRepublic / Cairo360 Brendon Ogilvy: VP Digital Insights, EffectiveMeasure Shady Sherif: CEO, Core Publications

Meet Zaytouneh, arabic short video recipes

Image
One of the amazing startups presented in ArabNetCairo, was Zaytouneh , which provides its end users with easy recipes elaborated in short videos (upto 2 minutes). The founder, @FidaTaher , is a video content producer with a lot of experience.. Her passion for the startup was clear in her demo. On the personal level, I liked this demo a lot from the video recording prospective because: Fida stood directly next to the slides which made things better and clearer than other videos. and because she was on stage. so she didn't cover the lower part of the screen as in the videos of the other startups :) I better leave you with the demo

New mothers, You are not alone

Image
SuperMama, The winner of the first positions in StartupDemo of ArabNetCairo, is a community based website that supports mothers through the rough times of motherhood.. Check their wonderful presentation

Marhaba Palestine

Image
One of the most remarkable startups that are valuable to the community. Marhaba Palestine is there to change the way the world looks at palestine. and shows how it is a wonderful country for tourism. enriching the economy and the culture. follow them at @marhabaPLS

Enrich your travel experience with Touringa

Image
If you happen to travel to other places, you can find more about those new places easily and effectively with Tourunga . It connects travelers with other travelers and with the locals of the country, allowing a rich collaborative community for much better traveling experience.

Find your sports mate with SporBro

Image
SporBro is one of the startups creating during STartupWeekendCairo on April 2011. They've launched the beta version . and participated in Startup Demo of ArabNetCairo. It is basically about match making. To help you find sports partner if you are interested in a game, and do not have someone to practice with.

Eventtus in ArabNetCairo

Image
"Eventtus will help you Find interesting events you don't want to miss, Share your plans with friends, Socialize during events like never before, Meet new people who share same interests, Organize awesome events in simple steps for free, and Have fun." from the official website of Eventtus

BasharJobs presented in ArabNetCairo

Image
BasharJobs, Job matching site with advanced matching technology targeting the arabic region. pretty challenging field with a lot of already positioned competitors.

Iqraaly presented in ArabNetCairo

Image
Iqraaly, one of the startups presented in ArabNetCairo, that helps people to listen to arabic audio content while they're in their cars through mobile. I will leave you with the demo

SweetyHeaven in Startup Demo of ArabNetCairo

Image
Sara Galal, founder of SweetyHeaven , a young entrepreneur who also works as an HR specialist at eSpace . Sara knew the passion of her 3 years old daughter, Hadya, about using computers. and as a mother, she wanted to make things valuable and useful to her child. She spotted the opportunity and moved on to build her startup, SweetyHeaven. After winning the first position in Startup Weekend Alexandria last September, Sara presented SweetyHeaven in ArabNetCairo conference. winning the second position in Startup Demo competition. Honestly, I'm waiting for the web app to be public. to allow my own kids to use it. So excited already.

The best touching speech ArabNetCairo

A week ago, I was in ArabNetCairo conference by ArabNet.me. An event made for entrepreneurs, investors and business professionals to help entrepreneurship in the MENA region. In my opinion, the most touching and valuable speech was the one of Dr Khaled Ismail. Dr. Khaled Ismail is the Founder and CEO of SySDSoft, a company focused on the design of wireless communication system modems. In March 2011, SySDSoft was acquired by Intel making Dr. Khaled Managing Director of Intel Mobile Communications. During his speech, He gave us sincere advice. and told us about his mistakes to learn from them. Do not miss it

A Thank You Letter from the Egyptian Government

Image
A couple of days ago, I received a thank you letter that is dedicated to my beloved eSpace , and the team of volunteers behind www.estefta2.eg . The letter was from MSAD, " Ministry of State for Administrative Development ", Although I had not expected such a thing, but it felt nice. The story goes back to last month, about 10 days before the referendum on the Constitutional Amendments. I was, along with other eSpacians, notified that there is an urgent need for the referendum website. Everyone of us had his own running project, tight schedule and deadline.. So it was key clear that doing this means volunteering our own after-work-hours time. We were so excited because we've always wished to contribute in building the country, in our own field, Web Development. We were a little bit concerned about working with the government due to the expected bureaucracy, But the team of MSAD that we dealt with was really cooperative and worked with the same spirit that we did. We were ...

Rails 3 "couldn't parse YAML" error suddenly showing up

I have been developing on the latest Rails 3, Ruby 1.9.2 for a while. and suddenly in 2 projects I started to get this YAML loading error when I try to start my server or run the tests. bundler./home/mahmoud/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/psych.rb:148:in `parse': couldn't parse YAML at line 55 column 12 (Psych::SyntaxError) from /home/mahmoud/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/psych.rb:148:in `parse_stream' from /home/mahmoud/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/psych.rb:119:in `parse' from /home/mahmoud/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/psych.rb:106:in `load' It turned out to be related to my recent upgrade of bundler to 1.0.10 After this update, my database.yml was not considered a valid YAML file. until I realized I have to put the special character values (for example: asd@#$asdf@$@) between double quotes. This fixed the problem for now I also came across another approach that basically will use a different YAML engine, This is wi...

Recovering GRUB after windows installation

I finally used my windows upgrade kit to upgrade my laptop from windows Vista to Windows 7. This has been too much delayed because I use ubuntu lucid mostly anyway :). One of the side effects during the upgrade is to load the GRUB loader menu from which I select the OS to load. Windows overrides that upon installation so it is completely by passed. Luckily, this is a well covered topic at ubuntu forums since it is a likely thing to occur A nice guide on how to restore the grub menu can be found at https://help.ubuntu.com/community/Grub2#Reinstalling%20from%20LiveCD This is useful if you are using GRUB2, ubuntu 9.10+ To summarize: Use a live CD to boot ubuntu on you computer mount the system partition (or the partition having the /boot directory) in the original installation of ubuntu that you have to a specific location (say /meda/ubuntu_sys) use the grub-install command: sudo grub-install --root-directory=/media/ubuntu_sys /dev/sda Reboot your system and , voila, ...

Silence

It has been a long while since I updated my blog.. I guess tweeting became an quick way to express and share my thoughts.. although my tweets are mostly non technical :) If interested, follow me at @modsaid