Switched the Internet from Menatelecom to VIVA

I have been using Menatelecom for over a year now, it was good, however, I never had success with VOIP with them… I didn’t want to go back to Batelco, it used to disconnect all time, due to the SWITCH being too far and having a very bad ADSL service. I tested VIVA for few months now.. It is simply great!! Even VOIP is perfect! So today, I made the switch, and I am totally connected to the internet via VIVA.. I get about 3Mbits in my house due to low coverage.. Browsing speed is awesome! I connected it via a 3G router, and now my whole house is connected via VIVA. Everybody is happy now! Tomorrow I will pass by Menatelecom and disconnect the line.

  • Share/Bookmark

Quote about Happiness

For every minute you are sad, you lose sixty seconds of happiness.

  • Share/Bookmark

Quote About Forgiveness

What is Forgiveness? In English, To forgive is to renounce anger or to excuse. However, there is another definition:

Forgiveness is the perfume a flower leaves on the shoe that crushed it.

  • Share/Bookmark

Python Programming!

I have tried Python earlier, but its syntax didn’t make sense to me. Several weeks later, I wanted write a small app, so, I thought, why not try to write it in Python.. Just give it a try… So, I start writing the app in Python, it took longer than it should have, but it was done! Now, I can program in Python. I am so happy that I have finished writing my app in Python. Looks like Python has been added to my portfolio of programming languages.

  • Share/Bookmark

Quote about Memories

Memories are the best souvenirs.

  • Share/Bookmark

Quote about Friendship

A true friend walks in when the whole world walks out.

  • Share/Bookmark

A Very Quick Update once again

Once again, I post a very quick update… I seem to be busier than I expected.

  • I have been really active on twitter, you can follow my daily life through twitter if you would like to.
  • On April 25th I received the iPad. (Posted on Twitter)
  • I found the template I am looking for.
  • Testing Yii Framework as a replacement for CodeIgniter and Kohana…

Being a father is not easy.. Hmm, while I am typing I remembered that I never posted that I have become a father. I am a father of a beautiful daughter named Sara.

  • Share/Bookmark

Quick Updates

It has been really a long time since I last wrote something on my blog, but here is a quick update..

  • I have been really active on twitter, you can follow my daily life through twitter if you would like to.
  • I have purchased Apple iPad, and I am hoping for it to arrive sometime next week.
  • I have upgraded my MacBook from Mac OSX Leopard to Snow Leopard.. Significant performance difference, and a better battery life.
  • VIVA service is getting better, and I am getting less disconnected calls.
  • Searching for a web app template that have a generic use, still can’t find a useful one.

I have been extremely busy with my life the past few weeks. I think that I try to do tons of stuff at the sametime, but I end up finishing the important stuff only.

  • Share/Bookmark

Since Viva BH doesn’t provide manual settings…

Since Viva BH doesn’t provide manual settings… I decided to extract their manual settings from the automatic settings and post them here…

Internet Connection:

APN: viva.bh
Username: (blank)
Password: (blank)

MMS Settings:

Service Center: http://mms.viva.com.bh:38090
APN: vivawap.bh
Username: (blank)
Password: (blank)
Proxy: 172.18.142.36
Proxy Port: 8080

  • Share/Bookmark

VIVA Bahrain – 1 day review

I am one of the people who gets really annoyed when I don’t get what I have been promised with. I have people who don’t keep their promises. So, I walk to Viva Shop in Jawad Dome. I stay in the Queue, and the shop says sorry we are closed. After waiting for 1 hour, they said they closed. Of-course after people showing their annoyance, they said they’ll process who ever was there.. and they wont accept new customers. So, I wait for another hour. And I get my SIM Card, but not activated card. I get promised to have the card active by the same night, or maximum by next morning (Which is today). However, today at about 3.00pm, I try to use the card. and the Card is not active, so I call 124.. I make a big deal of it and the team leader Hussain Alfardan, does his magic… and gets my card activated 4 hours later… Anyway, I call this magic… It rarely works with telecoms companies. However, the card is active, so I try it on my iPhone. I get the regular message from any provider saying that the handset cannot be configured automatically and I have to contact 124. However, I call them, and they say:

Sorry Sir, we don’t have manual settings.

I tell him to escalate my issue, and he forwards me to his manager, and the manager says:

Sorry Sir, we don’t have manual settings and there is nothing I can do to help you!!!

Wow, what a customer service guy, if he worked for me, he would have been fired instantly. They don’t provide manual settings and they tell me they cannot do anything for me… I am paying for a service and I cannot use this service.

Also, I call again asking about why I am being charged BHD1.429 on the unbilled for my number. He they say we cannot help you sir.. We have to call you back after couple of hours. What type of service is this? They are running a joke company!

  • Share/Bookmark

Follow me on twitter

I have been a bit active on twitter.. I don’t know when I stop twitting.. However for the time being, you may follow me on twitter (http://www.twitter.com/alialmahdi/).

  • Share/Bookmark

Replace text in many files using perl

Last night, I have several files containing the same text and I wanted that text to be replaced. I used perl one liner to do the job and I thought it may be useful for someone else so here it is:

perl -e “s/text/replacewith/g;” -pi.orig *.txt

This is going to save a backup of the files with .orig extension and do the replace. If you don’t want backup, then remove the .orig from the line.

Also, if you want to replace text in all files in a directory, then use:

perl -e “s/text/replacewith/g;” -pi.orig $(find . -type f)

  • Share/Bookmark

ZenCrypt — PHP Encoder

Last night, I was searching the internet for PHP Encoders, I always knew that ZendGuard and IONCUBE are the best. However, I thought of giving others a chance. While searching I came across ZenCrypt. One of the good things about it that it doesn’t need a loader on the server-side. Thus, the scripts are self-decodable. But this makes it easy to decrypt. On thier website, they have two scripts. One is the source, and the other is the encoded script.

My Attempt to understand its way of encoding to see if it worth the USD45.

Source PHP Code:

<?php
/* -------------------------------------------------
               www.ZenCrypt.com
             ZenCrypt simple demo

User Manual: http://www.zencrypt.com/INFO/ZenCrypt_PHP_Encoder.pdf
------------------------------------------------- */

//{{{PHP_INSERT_a1}}}
// Encoded chunk of code will be inserted here by ZenCrypt
// Encoded version - test_encoded.php was generated by running ZenCrypt with this command:
//    php -f zencrypt.php infile=test_plain.php outfile=test_encoded.php enccycles=10 stripcomments=yes
//{{{/PHP_INSERT_a1}}}

// This code client will see
$encrypted_number = 52728;

$resulted_number = ZEN_encrypt ($encrypted_number);
echo "\nEncrypted number=$resulted_number";
$resulted_number = ZEN_decrypt ($resulted_number);
echo "\nDecrypted number=$resulted_number";

//{{{PHP_ENCODE_a1}}}
// This part will be encoded and moved above (in between PHP_INSERT tags).
// We do not want to expose these "super secret" encryption functions to the clients.
function ZEN_encrypt ($input)
{
return ($input+5432);
}

function ZEN_decrypt ($input)
{
return ($input-5432);
}
//{{{/PHP_ENCODE_a1}}}

?>

Encoded Code:

<?php
/* -------------------------------------------------
               www.ZenCrypt.com
             ZenCrypt simple demo

User Manual: http://www.zencrypt.com/INFO/ZenCrypt_PHP_Encoder.pdf
------------------------------------------------- */

$juTSvfNAGsrLGell='=ch/5z/T/fd3E73dPj+i+/rRNYcW/rz/sr6zjSNreaXN+nf/W876jLfWtd9fYXR5F3mtYCRhWNW7dOXGP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rTYefTNAsiFGhw$(ireegf(rqbprq_46rfno(rgnysavmt(ynir';$LoMOYHmyNmPlxD=strrev($QynVyKBtA_laXYfjkJ);$lUETluMevSaLCDV=str_rot13($LoMOYHmyNmPlxD);eval($lUETluMevSaLCDV);

// This code client will see
$encrypted_number = 52728;

$resulted_number = ZEN_encrypt ($encrypted_number);
echo "\nEncrypted number=$resulted_number";
$resulted_number = ZEN_decrypt ($resulted_number);
echo "\nDecrypted number=$resulted_number";

?>

My Attempt to Decode the Code:

<?php
/* ————————————————-
www.ZenCrypt.com
ZenCrypt simple demo

User Manual: http://www.zencrypt.com/INFO/ZenCrypt_PHP_Encoder.pdf
————————————————- */

$juTSvfNAGsrLGell=’=ch/5z/T/fd3E73dPj+i+/rRNYcW/rz/sr6zjSNreaXN+nf/W876jLfWtd9fYXR5F3mtYCRhWNW7dOXGPsM19c920z3acnzSfxYMLFxg/Lz0nIz1FfpnLVdf/xksrTZqs55rpk///93fz27zHki6/oWYz1+9boz693v+vwQE52qDxffRSPNxjIf7xOfHb07GgxXHS/CawCIAXw9xuOY/EVs2KuqrxeJFCMTjEENA0ny6gTRUnndy30KTE/uyY77Pa0TWPVyHmqmYQ98Vf+dgq80ne2FgRkZzz1I103xrDgFjbVdXrcq4coJhOlJwGfXOMVavufyVOwpoIna3qQ5ldM+cVFUwoIHxuEbp3t6HEKKHnhi8rDY6aBfCxM9HkjSCeDP5gWj8GO2zaLsMsrsmLaLw605dRJDxFQZcyTe/X5RDaN9pJ0JTlyEzs0b6ds4cIeRg0uf7/INtfOgFECfah6aJz5Z8WbW5XorpGJZQAk/0H4sxB6GZiXZT44QtxETrhcqSgW5rtxHBxfDN6o8R8m7tbItO7uy3VBIRCi7f1Z+g6qkDoFRh3oiPBehlfbWHOCxdljFFxBjWwZhwOG/tAPA/EtX8LOkw3h04N+Ju7F25yDu6L7itrTU2jJ4dhqbPfBXzXg73fIzmZCyYxdmischnH+1voRzSntcnhxhyLfEriTCyEOhlOlzadH8WzfTUst9O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EAEfnnSTDy9Ybt7L5xukkRuaHG3DKRJm/I48XOQkubAcY3ZuRHKIl8OcQeyd2jIY06sMvd5Ud8wiqvTtxHuyJV+S9cTmo2NsL/LZV/c19kmOMpKd0N1d62IdjeeufMxGxM42QFe+NS+rZeD5jY9KOe6c4adcJMToZDt7F8mEN4isP9okCSxpN1Wvr8cpj+Rwn6xFslssE60hp54EwDmogCfgu1xz9dLGUCP4hk8BQAEPxCJ3+8KALk/4ry59SEHgAsPZW3QeuBJ1xQWsQQHnvphTU/hFcFApGOYgiqw+P2bHPAtahgbhG4g5twGhSmwIIAggBccUccjnrn9Z2wn+ZbQAB1eN9CTMBQMBEE98OApvjbJ2EAYeui/+/PE0n78g542p9K1FhlIIT7xFwOvff919+OIkX675p2SBB7YNRuCWYXBZyvDISuj3SVb’;$QynVyKBtA_laXYfjkJ=’;))))yyrTYefTNAsiFGhw$(ireegf(rqbprq_46rfno(rgnysavmt(ynir’;$LoMOYHmyNmPlxD=strrev($QynVyKBtA_laXYfjkJ);$lUETluMevSaLCDV=str_rot13($LoMOYHmyNmPlxD);eval($lUETluMevSaLCDV);

//print  gzinflate(base64_decode(strrev($juTSvfNAGsrLGell)));

$str=str_replace(“eval”,”\$str=”, gzinflate(base64_decode(strrev($juTSvfNAGsrLGell))));
eval($str);
print $str.”\n–\n”;
//print “–\n”;
for($icount=0; $icount<17; $icount++) {
$str=str_replace(“eval”,”\$str=”, $str);
print $str.”\n$icount–\n”;
eval($str);
print $str.”\n$icount–\n”;
}

// This code client will see
$encrypted_number = 52728;

$resulted_number = ZEN_encrypt ($encrypted_number);
echo “\nEncrypted number=$resulted_number”;
$resulted_number = ZEN_decrypt ($resulted_number);
echo “\nDecrypted number=$resulted_number”;
?>

Conclusion:

What I see that it doesn’t worth the the USD45. Maybe if it was encoded with ZendGuard or ionCube and produces a file that requires a PHP Loader. Just like PHPCipher.
However, from this attempt. I thought that I will write my own encoder. It will be using the same method, however, the output will be encoded in both ZendGuard and ionCube. Stay tuned!

  • Share/Bookmark

Few days ago, I purchased an iPhone 3GS 32GB

Few days ago, I purchased my White iPhone 3GS 32GB. My History with iPhone is long back when I the 2G. I love the changes in the in the iPhone… Specially the feature that I missed much, Copy-n-Paste Text!!! and the New Push notifications!!

I replaced my BlackBerry with this iPhone. It has been doing it’s job perfectly.

  • Share/Bookmark

A new year arrives and new projects to come

A new year arrived, and new projects are arriving… My friend Marwan and myself started having several projects to be developed for the Maemo powered devices. However, after discussion today, we have agreed on developing stuff to be cross platform. Most of our development well be in Python GTK.

The agreement is that Marwan will do most of the development, I will be maintaining the projects. I will be responsible of the packaging and bug fixing and some development. Marwan will be doing the core of the applications.

We will be registering a new domain and it will be dedicated for our joint projects. We have lots of ideas, so wish us luck!!

  • Share/Bookmark

You have Zero Privacy Anyway — Get over it

I have read a very nice article in OSNews talking about that we have a zero privacy on the Internet. I recommend reading it: http://osne.ws/hfv

  • Share/Bookmark

Rain and accidents

Today was a rainy day. Which we are not used to. So we’d expect accidents. Here is an example taken by my N900

  • Share/Bookmark

Story about Love

Story:

‏​وقع طائر في حب ورده بيضاء وقرر ان يصارحها ولكنها رفضت وقالت انها لا تحبه فظل يصارحها بشكل يومي حتى قالت له الورده البيضاء عندما يصبح لوني احمر سوف احبك ففي أحد الايام اتي الطائر وقطع جناحيه ونشر دمائه علي الورده البيضاء حتي اصبح لونها احمر وحينها ادركت الورده كم احبها الطائر ولكن الوقت قد فات لأن الطائر قد مات لذلك عليك احترام مشاعر الشخص الذي يحبك قبل أن يموت لإجلك

Translation:

A bird fell in love with a white rose, and he decided to tell her how he felt, but she rejected him. He insisted and kept on telling her how he felt everyday, until the white rose told him that she will only love him if her color becomes red. So one day he comes and cuts his wings and spilled his blood over her and her color became red. At that time she knew how much the bird loved her, but it was too late since the bird has died.

Moral of the story:
You have to respect feelings of the people who loves you before they die for you.

  • Share/Bookmark

Nokia N900

On Saturday, I got my Nokia N900… Simply this phone rocks! I love this phone!

Nokia N900 Maemo 5

  • Share/Bookmark

Saturday, 21st November was my birthday

On Saturday, 21st of November 2009 was my birthday. It was a very special day for me. Thanks to everyone to made me enjoy my day, and specially my wife. She took me to have dinner in Pizza Italia and prepared a very nice table for me. I love the Aigner package! Thanks for the special dinner honey!

  • Share/Bookmark

WordPress Themes