Autopilot (for FB Airline Manager)

NOTE: The script no longer works, and the development was stopped

After being bored with Airline Manager in Facebook in which you have to keep watching your airplanes when they arrive to send them in another flight, I decided to write my own script to use with greasemonkey in FireFox to do that thing for me. Basically, you will need a computer that is connected to the internet and running for most of the time. Install Firefox and add the Greasemonkey add-on to it, then install my script in greasmonkey and enable it if it is not enabled by default. Now when you visit the flight section of the game under facebook you will see the Auto Pilot control box (shown below) in the left column. Simply set the time that you want the script to repeat the task then click on the button. That’s it, now just watch the script fly the first 10 ready airplanes and the count down will start to trigger the next run.

كثير منا يجد العاب الفيسبوك (Facebook) مملة بعد فترة من اللعب بسبب ان اسلوب اللعب يصبح متكر ورتيب ومن امثلتها لعبه مدير الطيران (Airline manager) اذ يجب عليك متابعه مئات من الطائرات وانتظار وصولها لكي تقوم بارسالها مرة اخرى في رحلة جديدة، فلذك السبب قمت ببرمجة برنامج صغير يعمل في متصفح الفايرفوكس (Firefox) تحت اضافة قريسمونكي (Greasemonkey). فاذا كنت من من يلعب هذه اللعبة وعندك جهاز متصل بالانترنت ويعمل بشكل مستمر فكل ما عليك هو تركيب متصفح الفايرفوكس واضافة القريسمونكي له ثم تحميل برنامجي فيه ومن ثم قم بقتح صفحة اللعبة من الفيسبوك واضغط على رابط الطيران (Flight) و سوف تجد ادوات التحكم ظاهرة في الجهه اليسرى من الصفحة كما تراها في الصورة التالية. قم بتحديد الزمن الذي تريدة لتكرار عملية الطيران ثم اضغط زر (Auto Pilot) فسيقوم البرنامج بارسال اول 10 طائرات جاهزة ثم سيكرر العملية بعد انقضاء العد التنازلي.

Auto Pilot control box

Here is an image showing the position on the control box in the page:

هذه الصوره توضح موقع ادوات التحكم في الصفحة:

Download the code from here: https://github.com/fduraibi/Autopilot
Continue reading “Autopilot (for FB Airline Manager)”

Insert images into gmail emails

I have just found out that you can include images into gmail, not just through attachments but to embed them with in the email content. To activate this feature go to gmail Setting then Labs and look for and enable “Inserting Images”

Insert Image - Gmail Labs

After enabling this feature you will find a new icon in the email text editing toolbar clicking on this icon will allow you to embed images from your computer or from the internet using a URL

Inserting image into an email

You can also find more useful features in gmail Labs like adding more Emoticons and browsing your emails offline.

WP-RTL

I have always wanted to write bidirectional posts with English and Arabic languages together. However, to do so I needed to have the support for RTL and LTR from the TinyMCE editor in wordpress which was not there (this is true at the moment of writing this post).  The only possible was was to edit the post in the html form and add the required tags and parameters.

كثيرا ما وددت ان اكتب مقالا في مدونتي يحتوي كلمات من اللغة العربية الانجليزية ولكن ذلك يتطلب استخدام محرر نصوص يدعم الكتابة من اليسار لليمين ومن اليمين لليسار و للاسف فان محرر النصوص TinyMCE المدمج مع مدونت wordpress لا يقدم ذلك الدعم (الدعم غير موجود حتى لحظة كتابة هذا الموضوع). وكانت الطريقة الوحيدة لعمل ذلك هي عن طريق تعديل نص html مباشرة.

One day I decided to write my own plugin to enalble such this feature and to my suprise I found that the original TinyMCE editor already has that support in the needed files are actually installed with wordpress but are being disabled!  😕

في احد الايام قررت ان اكتب plugin لمدونة wordpress لاضافة هذه الخاصية وبعد البحث تفاجت بان البرنامج الاصلي لمحرر TineMCE يوفر الدعم للكتابة بالجهتين وان الملفات الخاصه بذلك موجودة مع مدونة wordpress ولكنها غير مفعلة! 😕

So that made my day easy and all I have done was to enable these features (LTR & RTL) and add their buttons to the toolbar 😀

هذا الاكتشاف سهل العمل بشكل كبير حيث ان كل ما كان علي عملة هو تفعيل تلك الخاصية واضافة الازرار في شريط التحرير الخاص بـ TineMCE 😀

TinyMCE showing the LTR & RTL buttons

TinyMCE showing the LTR & RTL buttons
صورة تبين الازرار المضافة لشريط التحرير

The resulting HTML code with some LTR and RTL lines

The resulting HTML code with some LTR and RTL lines
نص الـ HTML ويبين تعديلات الاتجاة للنص

Download

Get a Travian Hero without losing a soldier or a knight

This is a small trick that I found while i was playing Travian, the online real-time war game. Travian players know that you can have only one hero for you village, and this hero is just one of your regular soldiers or knights that you choose to have a special training that makes him much stronger. So as I have said you have to taking an existing soldier and convert him to a hero. But what if you can train a hero from nothing and without losing any soldier or knight? Continue reading “Get a Travian Hero without losing a soldier or a knight”

Fedora 9 and UTC time problem

Fedora 9 was released I installed it on my laptop next to the pre-installed Fedora 8 and Windows XP. There are some issues with the release, like nVidia drivers, but I was expecting such things. However, there was one small problem that didn’t make since at first which is the time settings.

Whenever I change from Fedora 8 or Windows XP to the new Fedora 9  or vice versa the time of my machine will change, it will go backward or forward with a fixed offset, and I knew it is a problem with timezone. So before I explain the problem I would like to mention that each machine has a clock that works even if the machine is turned off, using a battery that is connected to the motherboard, and when the operating system boots it will read the time from that clock. Continue reading “Fedora 9 and UTC time problem”