Jun 25 2009

Mp3 to Ogg converter

438 views

For some time, I needed to convert a big number of files from mp3 to ogg format, as I didn’t see any loss of quality with the ogg format, also it need less space.

The problem was that I want to keep my id3 tags, rewriting them would be a pain in the a**. I searched the web for free tools to do that, but I couldn’t find any, maybe I didn’t look enough. So I had to implement it myself.

Also, as I’m learning ruby, I thought it would be a good idea to use it for the script.

The tools I needed to do this, were mplayer, id3tool, and oggenc (vorbis-tools). Also in order to utilize my quad-core processor, I built it in a multi-threaded way (not so much, but it works :-) ).

Now, I noticed that oggenc takes a lot of time, more than mplayer, so it was loading my tmp directory, so I made the mplayer thread wait when oggenc has 20 or more in it’s queue to process. Also, for more utilization, I put 3 threads for the oggenc to process.

I think that the script can use some improvements, feel free to post your feedback.

The script is available at git-hub at http://github.com/alaaibrahim/mp3toogg

Enjoy


Jun 18 2009

Zend Training, does it really worth it

167 views

Every now and then I recieve some emails from Zend about training (I have an account there for the certifications I got), usualy they go directly into the trash. Continue reading


Jun 6 2009

Economy is going bad

155 views
Economy is going Bad

Economy is going Bad

I got this picture from a friend, it’s so cute, I know the economy is going bad, but I think that the cat exaggerated :)


Jun 5 2009

Are you using YouTwitFace?

163 views

“In the year 3000, YouTube,Twitter & FB will merge to form 1 super time wasting website called “YouTwitFace”
Conan O’Brian”

The cute thing is that Youtwitface.com already exists.
Lucky guys. :)


Jun 4 2009

Pass by Value or Reference or Handle

246 views

I’ve been expermenting with ruby for sometime now, and I’m really enjoying it, and I’m now coping with ‘#’ comments :-)

Now one of the points that’s about functions, is how do they pass, by value, or by reference. So to try out Ruby. Continue reading


Mar 26 2009

A script to make sure that my IPv6 Tunnel is always on

391 views

I’m using an IPv6 tunnel using http://go6.net/, and when the internet connection goes down and up after a while, the tunnel just doesn’t refresh it self.
I run it on crontab for every 5 minutes for now :)
My Machine is Gentoo 2008, I guess you need to do some changes for it to work on your distro.
Hope that any one will benefit from it

  1. #!/bin/bash
  2. function restartGW {
  3.         /etc/init.d/gw6c restart
  4.         date >> /var/log/checkipv
  5. }
  6. stat="`/etc/init.d/gw6c status | tr -d ‘ ‘ | cut -d’:’ -f2`"
  7. if [ $stat == ’stopped’ ]
  8. then
  9.         restartGW
  10. elif [ $stat == ’started’ ]
  11. then
  12.         IPV4connected="`echo $(nc -zv www.google.com 80 2>&1) | cut -d’)’ -f2 | tr -d ‘ ‘`"
  13.         if [ $IPV4connected == "open" ]
  14.         then
  15.                 # check ipv6 connectivity
  16.                 IPV6connected="`echo $(nc -6zv ipv6.google.com 80 2>&1) | cut -d’)’ -f2 | tr -d ‘ ‘`"
  17.                 if [ $IPV6connected == "open" ]
  18.                 then
  19.                         exit 0;
  20.                 else
  21.                         restartGW
  22.                 fi
  23.         fi
  24. fi
  25. exit 0

Update:
This script is available at github on http://github.com/alaaibrahim/ala-scripts/.


Feb 25 2009

Formal Apology

376 views

When you do something wrong, use this form to apologize :)

Formal Apology

Formal Apology


Feb 24 2009

The Piano [Life is a Song]

487 views

This is the song “Comptine D’un Autre Ete” for the Musician “Yann Tiersen” from the sound track of the film “Amelie“.

I love this music, but I really enjoyed this video, I just wanted to share it with everybody else, enjoy!


Feb 16 2009

Merging

341 views

For a long time, I had two blogs, Gurus Place, and this one, as I used to separate the technical from the other stuff, the problem was that, sometimes it was a little bit hard to differentiate between, technical, and non-technical posts.
So I moved Gurus Place here, and did the 301 redirect here :)


Feb 15 2009

Designing the Future – The Venus Project

438 views

A Dream that can be made true, with everybody’s help

Also you can read more details in the pdf http://www.thezeitgeistmovement.com/DesigningtheFuture.pdf

The Venus Project