A quick and dirty upload/download speed calculator.

Scenario: You`re at work, you upload something BIG to your home machine. You leave work. You come home, you want to see the progress and you also want to know the speed of the upload/download. (if the connection stalled or not) (Our test file is: hda1.tar.gz)

You can try: watch ls -al hda1.tar.gz

But I wanted something more numeric 😛 Like bytes/sec, ETA, etc… : ) So I wrote this little script.


# Usage:
# speed.sh <filename> [<filesize>]

OLDFILESIZE=`ls -al “$1″| awk ‘{print $5}’`
sleep 2
while true; do
FILESIZE=`ls -al “$1” | awk ‘{print $5}’`
let “SPEED = $DIFF / 2 / 1024”
if [ $2 ]
let “ETA = (($2*1024*1024) – $FILESIZE )*2 / $DIFF”
let “ETAM = $ETA/60”
echo “Filesize: $2MB | Downloaded: $FILESIZE bytes”
echo “$1 download speed = $SPEED Kb/s  | ETA: $ETA s – $ETAM m”
echo “Downloaded: $FILESIZE bytes”
echo “$1 download speed = $SPEED Kb/s”
sleep 2

Pretty self explanatory : )

I`m trying to make your voice heard Jumah…

A voice from Guatanamo`s darkness 

A current detainee speaks of the torture and humiliation he has experienced at Guantanamo since 2002.
Jumah al-Dossari, JUMAH AL-DOSSARI is a 33-year-old citizen of Bahrain.
This article was excerpted from letters he wrote to his attorneys. Its
contents have been deemed unclassified by the Department of Defense.
January 11, 2007

Guantanamo Bay Naval Base, Cuba — I AM WRITING from the darkness of the
U.S. detention camp at Guantanamo in the hope that I can make our
voices heard by the world. My hand quivers as I hold the pen.

January 2002, I was picked up in Pakistan, blindfolded, shackled,
drugged and loaded onto a plane flown to Cuba. When we got off the
plane in Guantanamo, we did not know where we were. They took us to
Camp X-Ray and locked us in cages with two buckets — one empty and one
filled with water. We were to urinate in one and wash in the other.

At Guantanamo, soldiers have assaulted me, placed me in solitary
confinement, threatened to kill me, threatened to kill my daughter and
told me I will stay in Cuba for the rest of my life. They have deprived
me of sleep, forced me to listen to extremely loud music and shined
intense lights in my face. They have placed me in cold rooms for hours
without food, drink or the ability to go to the bathroom or wash for
prayers. They have wrapped me in the Israeli flag and told me there is
a holy war between the Cross and the Star of David on one hand and the
Crescent on the other. They have beaten me unconscious.

I write here is not what my imagination fancies or my insanity
dictates. These are verifiable facts witnessed by other detainees,
representatives of the Red Cross, interrogators and translators.

the first few years at Guantanamo, I was interrogated many times. My
interrogators told me that they wanted me to admit that I am from Al
Qaeda and that I was involved in the terrorist attacks on the United
States. I told them that I have no connection to what they described. I
am not a member of Al Qaeda. I did not encourage anyone to go fight for
Al Qaeda. Al Qaeda and Osama bin Laden have done nothing but kill and
denigrate a religion. I never fought, and I never carried a weapon. I
like the United States, and I am not an enemy. I have lived in the
United States, and I wanted to become a citizen.

I know that
the soldiers who did bad things to me represent themselves, not the
United States. And I have to say that not all American soldiers
stationed in Cuba tortured us or mistreated us. There were soldiers who
treated us very humanely. Some even cried when they witnessed our dire
conditions. Once, in Camp Delta, a soldier apologized to me and offered
me hot chocolate and cookies. When I thanked him, he said, “I do not
need you to thank me.” I include this because I do not want readers to
think that I fault all Americans.

But, why, after five years, is
there no conclusion to the situation at Guantanamo? For how long will
fathers, mothers, wives, siblings and children cry for their imprisoned
loved ones? For how long will my daughter have to ask about my return?
The answers can only be found with the fair-minded people of America.

would rather die than stay here forever, and I have tried to commit
suicide many times. The purpose of Guantanamo is to destroy people, and
I have been destroyed. I am hopeless because our voices are not heard
from the depths of the detention center.

If I die, please
remember that there was a human being named Jumah at Guantanamo whose
beliefs, dignity and humanity were abused. Please remember that there
are hundreds of detainees at Guantanamo suffering the same misfortune.
They have not been charged with any crimes. They have not been accused
of taking any action against the United States.

Show the world the letters I gave you. Let the world read them. Let the world know the agony of the detainees in Cuba.

Original of this mail can be found here.

wine and Lotus Notes. (and a bit gentoo :)

I have to use Lotus Notes… Unfortunately. It`s a good overall tool,
and mail client, but I don`t like it… Anyway but I have to use it.

I don`t use Microsoft Windows at work anymore. I have a gentoo box
which handles everything that I need, very efficiently. But I needed to
use Lotus Notes…

There are millions of Howto`s on the web on using Lotus Notes on wine. And I followed one (or any) of them. It really works. Well, for some emails… I had crashes every once in a while, or maybe 10-20 times a day!!!! So it wasn`t efficient at all… :

As of writing, gentoo marks wine-0.9.22 as stable. And I was using an unstable wine release (0.9.28). I read some discussions on the bug 6376 where people had similar incidents when they upgraded from wine 0.9.21 to wine 0.9.22 (hello!)

I decided to downgrade to 0.9.21 by adding
“=app-emulation/wine-0.9.21” to /etc/portage/package.keywords, but
portage insisted that I should use wine 0.9.22!

So nice folks in #gentoo @ irc.freenode.org told me to mask everything
higher than latest stable by adding “>=app-emulation/wine-0.9.22” to

Now I`m running wine 0.9.21 and my Lotus Notes works very good. The
emails that were crashing the LN client are now readable and I`m a
happy puppy! : D

Interesting article on “dynamic pricing” of Amazon.com

Here on LA Times, I read an article about how amazon.com prices “mysteriously” increase when you put them in your shopping cart and check them out later in a day or two. 

Here is an excerpt from the article about how things actually would look stupid in a real life situation:

Imagine this: You go to a bookstore, browse, choose a couple of
volumes. But you don`t want to carry the books around. So you ask the
clerk to hold the tomes until Saturday, when you`ll come back to buy

you return, the bookseller hands you the items but advises you that
he`s raised the prices. “I knew you were hot to buy them,” the clerk
says, “so I figured I could make a few extra bucks.”

This is what happened to me when I tried the same thing:

Important Messages

Please note that the price of Leo Africanus has increased from $11.53 to $12.03 since you placed it in your Shopping Cart. Items in your cart will always reflect the most recent price displayed on their product detail pages.

Please note that the price of BMW 3 Series (E36) Service Manual: 1992-1998 (BMW) has increased from $50.37 to $52.77 since you placed it in your Shopping Cart. Items in your cart will always reflect the most recent price displayed on their product detail pages.