طريقة عمل الدوائر الإلكترونية في المنزل

كتبه: فهد الدريبي  /  التصنيف: Misc

هل رغبت يوما في عمل لوحة إلكترونية لكن تراجعت بسبب صعوبة العملية أو عدم وجود الأجهزة اللازمة؟

إذا كان هذا هو السبب فلدي الحل، قمت أنا وزميلي أحمد عباس بتصوير فيديو يبين طريقة عمل وتحميض تلك الدوائر باستخدام مواد وأدوات موجودة في المنزل أو متوفرة في السوق. هذا هو الفيديو الأول من سلسلة نود تقدمها في المستقبل تستهدف الهواة ومحبي التقنية في العالم العربي. لن أطيل عليكم وهذا هو الفيديو كما يمكنكم متابعته في اليوتيوب على قناة “تقنيات بالعربي” “TechsInArabic” (كما يمكن عرضه بجودة عالية HD)

Airline Manager Secrets and Cheats

Posted by: Fahad Alduraibi  /  Category: Games, Tricks

NOTE: These cheats do not work anymore

I am going to list here few tricks and cheats that you can use while playing airline manager on facebook. But be careful as some might get you banned from the game. For all of these tricks all you need is Google Chrome browser or Firefox with the Firebug add-on.

1- The BIG Money maker

For this cheat to work you need to have cargo planes, so get your pax points up and buy the cargo feature. Once you buy your cargo plane (get one that can carry big load for short distance, it makes more money) start creating its route (again demand is important,  distance is not) but stop at the point where you need to sign a contract. As you can see most prices are about $1.0 to $2.5. So pick any of these contracts, lets say the first one, and right click on the “Sign” button, from the list you will see an item called “Inspect Element” click on that and the browser will open a small box at the bottom of the page showing you some HTML code of that page and the code for the button you right click on is highlighted. See the picture:

Now double click of that highlighted part of the code, and it will allow you to edit. Look for “tcc=x.xxxx” where the x is a the current price of the contract. Simply change that value to whatever your like, the limit that you can set it to is $99,999 per lbs. Don’t set it to high or you will be noticed 8)

Now, click on the same “Sign” button which you modified the code for and you are done. You will be rich in no time ;-)

2- Buying more than 10 aircraft at once (Thanks Luke for this trick)

For most aircraft, pax and cargo, the limit that can be bought at once is just 10 (i don’t know why, seems that they like you to click and click more), to get more than that at once, maximum you can get is 99, go to the page for buying the plane you like, like in this picture:

then right click on the drop down box for the “Amount to purchase” and select “Inspect Element”, see the picture:

in the above picture click on the part of code that is highlighted with the second red oval, click on the code to change the number from value=”1” to value=”99” or whatever number you like, but 99 is the max, see picture:

You are done, set registration name and click “Buy aircraft”.

I am sure you can use the same method to do other tricks and make playing the game easier. But my number one recommendation is to use the Autopilot script ;) that will make you on the top 10 list like me

Front Mic problem in Fedora 14

Posted by: Fahad Alduraibi  /  Category: Linux

After upgrading to Fedora 14 I noticed that the built-in mic in my Dell D620 stopped working, after searching here and there I the problem is between ALSA and Pulseaudio, since alsa will show to capture devices “Mic” & “Front Mic” and Pulseaudio will use Mic as the default instead of Front Mic.

So I used “alsamixer” to set the correct capture source and that worked but after a reboot it was set back to Mic. Then I found about “alsactl” which should store the current setting by doing “alsactl store” but that did not work either since I think pulseaudio does not look into that.

Uninstalling pulseaudio as some people suggested solved the Mic problem but caused many other problems when playing many applications that want to play audio (like flash apps such as youtube and video apps…etc),  this is an ALSA problem that pulseaudio try to solve AFAIK.

The solution that I found was to use “amixer” which can be run from the command line with the parameters to set “Front Mic” as the capture source. Here is the full command for my device:

amixer -c 0 cset numid=6,iface=MIXER,name='Input Source' 1

To explain the previous command:
[-c 0] is to select the first sound card (the only card in my laptop, but if you have two cards they will be 0 and 1)
[cset] is to tell amixer that you want to set these settings
[numid, iface, and MIXER] are information about your card and what source you want to change the settings for, and here is how I get these information:

[fad@fad ~]$ amixer -c0 contents
numid=2,iface=MIXER,name='Master Playback Switch'
 ; type=BOOLEAN,access=rw------,values=2
 : values=on,on
numid=1,iface=MIXER,name='Master Playback Volume'
 ; type=INTEGER,access=rw---R--,values=2,min=0,max=31,step=0
 : values=14,14
 | dBscale-min=-46.50dB,step=1.50dB,mute=0
......
......
numid=6,iface=MIXER,name='Input Source'
 ; type=ENUMERATED,access=rw------,values=1,items=2
 ; Item #0 'Mic'
 ; Item #1 'Front Mic'
 : values=0
......
......

And as you can see in the previous result the part that am looking for is (numid=6,iface=MIXER,name=’Input Source’) and it lists Mic=0 and Front Mic=1 but the selected values=0 which is for Mic and I need to set it to 1

Here is the command again:

amixer -c 0 cset numid=6,iface=MIXER,name='Input Source' 1

put this command in a script file and make it run whenever you login to your profile (I tried adding it to the rc.local so it will execute with every boot but that didn’t work, since I think the settings is applied during login time for each user)

For KDE users you can put that script (or a link to it) under:

/home/<username>/.kde/Autostart/

or through the KDE “System Settings”>”Startup and Shutdown”>”Autostart”

Now at each login this command should set the correct input source which pulseaudio will use it.

lsof واخواتها (اوامر للنكس)

كتبه: فهد الدريبي  /  التصنيف: Linux

في هذا الموضوع ساتحدث عن بعض الاوامر اللتي اعتقد انها مهمة في للمساعدة في تشخيص وصيانة نظام اللنكس وجهاز الحاسب الذي يعمل عليه. يمكن تنفيذ هذه الاوامر كمستخدم عادي، لكن قد لاتكون النتائج كاملة ويجب تنفيذها كمستخدم رئيس (root) للحصول على جميع المعلومات.

اول هذه الاوامر هو lsof وهو اختصار (List Open Files) يعني عرض الملفات المفتوحة، والملفات في نظام اللنكس ليس محصورة بالملفات العادية كما تعرف في نظام الوندوز ولكنها تشمل المجلدات و المكتبات و ارتباطات الشبكة و انواع اخرى من الملفات الخاصه. وعند تنفيد الامر فسيقوم بعرض قائمة بجميع الملفات المفتوحه حاليا و اسم المستخدم الذي قام بفتح الملف ورقم العملية التي تم من خلالها فتح الملف (Process ID) و نوع الملف وحجمة (اذا كان ذو حجم معروف) و مسار الملف. القائمة في الغالب ستكون كبيره جدا ولذا تحتاج في الغالب لعمل تخصيص للتحكم في المخرجات.

احد الاستخدامات هي معرفة جميع البرامج المتصلة بالانترنت في حال الشك بان الجهاز قد يكون مخترقا او التاكد من حالة الاتصال بالمواقع او معرفة رقم المنفذ الذي يستخدمة خادم معين:

 lsof -i
اوامر مشابهه
ss -ap
netstat -tuap

اما في حال اردت معرفة (او اغلاق) ملف مفتوح (مثلا قمت بفتح ملف في كرت ذاكرة خارجي Flash Drive ولكن عند محاولت ازالة الكرت اخبرك النظام بان احد الملفات لازال مفتوحا) فالتوصل للملف المفتوح ومعرفة البرنامج المتصل بذلك الملف عمليه سهلة جدا باستخدام lsof وهي كالتالي:
اولا نفرض ان مسار كرت الذاكرة هو /media/disk/ فتقوم بتنفيذ الامر التالي:

lsof | grep /media/disk/

فالامر الاول lsof سيعرض جميع الملفات المفتوحة لكن بدل من تعرض النتائج على الشاشه بل سوف ترسل للامر التالي grep و المسؤل عن عمليه الارسال تلك هي علامة الانبوب | (pipe) حيث ان نظام اللنكس عندما يجد ذلك الخط العمودي بين امرين فانه يمرر مخرجات الامر الاول كمدخلات للامر الثاني. اما الامر grep فان امر ترشيح (Filter) حيث ان يقوم بالبحت في المدخلات عن اي سطر يحتوي على الكلمة المذكورة بعد (في مثالنا هذا فانه يبحث عن /media/disk/) ثم يعرض السطر الكامل الذي يوجد به مثل ذلك النص.
فالناتج النهائي من تنفيذ هذا الامر هو قائمة باسم الملف او الملفات التي لاتزال مفتوحة من كرت الذاكرة والبرنامج الذي قام بفتح ذلك الملف ثم ما عليك سوى اغلاق ذلك البرنامج وستتمكن من ازالت الكرت بشكل امن. ولاغلاق البرامج يمكن استخدام الامر kill مع رقم العملية (Process ID) كالتالي:

 kill <PID>  (اغلاق البرنامج بطيقة امنة)
kill -9 <PID>  (اغلاق اجباري للبرنامج)

اوامر اخرى من عائلة lsof هي:

lsusb يعرض قائمة باجهزة USB المتصلة حاليا بالجهاز
lspci يعرض قائمة كروت PCI المركبة بداخل الجهاز
lsmod يعرض قائمة بمعرفات الاجهزة التي تم تشغيلها
lspcmcia قائمة كروت PCMCIA المركبة بالجهاز
lshal قائمة الاجهزة المركبة في الجهاز (USB و PCIو غيرة)
lscpu معلومات عن المعالج المستخدم

مبادي نظام اللنكس

كتبه: فهد الدريبي  /  التصنيف: Linux

في هذا الموضوع سوف احاول تقديم بعض الاوامر المهمة لمستخدمي النظام المفتوح المصدر والمجاني لنكس. جميع هذه الاوامر تنفذ من خلال نافذة الاوامر (Terminal or Command Line) وفي الغالب ستجدها في جميع توزيعات اللينكس واليونكس كذلك مع بعض الاختلافات البسيطه احيانا.

* توضيح: ما اضعه بين علامتي <> يعني انه يجب استبداله بشي مناسب كاسم ملف او مجلد وما هو بين اقواس ( ) فهذا فقط شرح مني للامر المذكور ولايكتب اثناء التنفيذ.

سوف ابدأ بأحد الاوامر المهمة:

الامر: man
التعريف: عرض معلومات عن معظم اومر النظام وشرحها وطرق استخدامها
طريقة الاستخدام:

man <الامر>

الامر: ls
التعريف: لعرض الملفات الموجود في المجلد الحالي
طريقة الاستخدام:

ls (عرض الملفات والمجلدات فقط)
ls -l (الملفات على شكل قائمة مع عرض حجم الملف والصلاحيات)
ls -a (الملفات المخفية اللتي تبدا بنقطه)

كما يمكن دمج بعض الخيارات كدمج a و l للحصول على قائمة الملفات مع الملفات المخفية ولمزيد من الخيارات يمكن استخدام الامر man للحصول على المزيد من التفاصيل

الامر: cp
التعريف: نسخ ملف او ملفات الى مجلد اخر (او انشاء نسخه للملف باسم مختلف)
طريقة الاستخدام:

cp <file> <folder/>  (نسخ ملف الى مجلد)
cp <file> <newfile> (انشاء نسخة من الملف)

الامر: mv
التعريف: نقل ملف او ملفات الى مجلد اخر (او تغيير اسم الملف)
طريقة الاستخدام:

mv <file> <folder/>  (نقل ملف الى مجلد)
mv <file> <newfilename>  (تغيير اسم ملف)

الامر: rm
التعريف: مسح ملفات او مجلدات
طريقة الاستخدام:

rm <files>  (مسح ملفات)
rm -r <folder/>  (مسح المجلد و الملفات التي بداخله)

الامر: mkdir و rmdir
التعريف: انشاء و حذف مجلد (لحذف مجلد يشترط ان يكون فارغا، وان لم يكن فارغا فيستخدم الامر السابق)
طريقة الاستخدام:

mkdir <folder>  (انشاء مجلد)
rmdir <folder> (حذف مجلد)

الامر: ps
التعريف: عرض قائمة البرامج التي تعمل الان
طريقة الاستخدام:

ps  (سيعرض فقط البرامج التي تعمل في نافذة الاوامر)
ps aux  (جميع البرامج اللتي تعمل وتفاصيل مهمه اخرى)

الامر: df
التعريف: عرض معلومات عن المساحة المستخدمة والمتبقية من القرص الصلب لجميع الاقسام
طريقة الاستخدام:

df (عرض الارقام بالبايت)
df -h (عرض الارقام يصيغة اسهل للقرائة مثل ميقا قيقا)

الامر: free
التعريف: عرض معلومات عن استخدام الذاكرة والذاكرة الاحتياطية في القرص الصلب (swap)
طريقة الاستخدام:

free (عرض الارقام بالكيلو بايت)
free -m (عرض الارقام بالميقا بايت)

هذه بعض الاوامر وهناك الكثير وساقوم بكتابه موضوع اخر عن اوامر اخرى متقدمة

RPM Fusion Smart channels for Fedora

Posted by: Fahad Alduraibi  /  Category: Linux

If you are a Fedora user then you must be using RPM Fusion and if you are not then please do since it provides you with many cool packages that Fedora doesn’t come with (like ATI & nVidia drivers, video and audio codec…etc). After you install RPM Fusion repositories (through their provided rpm packages which you can find about under the ‘Configuration’ in their website) you will be able to use it right away from the command line by using ‘yum’ or if you like the GUI (like I do) then it is PackageKit. However, there is one thing that I don’t like about PackageKit which is dealing with dependencies.PackageKit will only resolve dependencies when you apply the changes not while you are making them (selecting to install or remove a package). I find that annoying since sometimes when I select to remove some packages that I think I don’t need and  when I click on apply it will show the list of dependencies of all the selected packages and will not tell you which one of the selected packages is needed by those other packages and the only way to find out  is by removing packages one by one. Same thing when installing.
However, there is a solution to this problem, it is called Smart, Smart is a package manager that can be used to manage ‘rpm’ packages (and also apt as well). You can install Smart and the GUI from Fedora repos with this command:

yum install smart smart-gui

The biggest advantage of using Smart over PackageKit is the way it resolves dependencies. Smart will do that instantly while you are clicking to install a new package or trying to remove one. So for example if you are using Fedora with KDE and wanted to remove all Gnome packages and you clicked for example on ‘gnome-vfs2′ Smart will immediately look for all other packages that depends on this one and if any it will show you a windows of the list of all other packages that will be removed as a result of removing this one, among that list you will find ‘Firefox’, ‘vlc’ and other packages that I actually need, so that means this one is important and i will just hit cancel to keep it. Same thing when for example you want to install and try some application but you find that it needs many other packages to be installed as well.

However, it seems that Fedora and RPMfusion are not giving much attention to Smart and the channels files (channel = repo) are not updated for Fedora 14 (was also the case for F13 when it was released) so I decided to update those packages myself and maybe find a way to send them to Fedora and RPMFusion so they will sign them and add them to their main repositories.

Download the appropriate files for your system or the source if you wanna compile the rpms and sign them yourself (you will need to rerun Smart so it detects the changes):

Update: Since not much attention from Fedora and RPMfusion is giving to Smart I built my own rpms again for Fedora 15:

Why Apple did not know about the iPhone4 antenna problem

Posted by: Fahad Alduraibi  /  Category: News

(IMO) That is easy to answer, because of Apple super secrecy they were testing the new design inside a case to make it look like the old iPhone. So the antenna was isolated from the user hand with enough distance to minimize the effect, and I am certain that it was also the case inside the company since they don’t want the other employee to know about it, but thanks to Gizmodo this thing was unveiled. In addition to that, they most probably have a big AT&T cell tower inside the company to make Steve happy.


Image from Gizmodo of the iPhone4 with the special case.
The camouflage case
The case it came inside was a fully developed plastic case to house this phone to disguise it like a 3GS. This wasn’t just a normal case; it had all the proper new holes cut out for the new switches and ports and camera holes and camera flash. But it looks like something from Belkin or Case-Mate. It’s a perfect disguise.

Source: Gizmodo

AirlineManager Ads Prices

Posted by: Fahad Alduraibi  /  Category: Games

While working on my script Autopilot to enable buying advertisement I started collecting information about the price changes over time, and found out that it is not actually random, but repeats every week. So here is a graph that shows the prices for 1 week and a table that shows the same thing and highlights the cheapest ones.

Sat Sun Mon Tue Wed Thu Fri
12 AM 49890 48089 32080 43022 47017 32213 40693
01 AM 48089 19004 32043 48612 37768 35792 49415
02 AM 23896 7435 32845 50324 32213 45439 49838
03 AM 7831 14021 34475 47017 33869 49890 39308
04 AM 8870 25482 36853 40843 40693 49838 14928
05 AM 21458 8658 39801 35177 47250 43232 7530
06 AM 22775 20310 43022 32213 49890 23896 8870
07 AM 7366 21438 46112 32555 50097 9763 19060
08 AM 20310 8083 48612 35792 48089 7435 25482
09 AM 23447 9777 50105 40693 39308 8870 14038
10 AM 10094 39347 50324 45439 23896 16499 8675
11 AM 7531 50168 49229 48567 11851 24883 22794
12 PM 19045 43179 47017 49890 7831 22775 23447
01 PM 46167 32218 44070 50168 7473 11015 11824
02 PM 50109 49244 40843 49838 8870 8675 7472
03 PM 43179 36829 37768 48089 14021 20310 9777
04 PM 31976 36545 35177 43232 21458 25582 29278
05 PM 44098 49611 33289 34525 25585 19037 48103
06 PM 43972 43972 43972 43972 43972 43972 43972
07 PM 32043 41531 38967 36524 34439 32909 32080
08 PM 48612 38967 34439 32080 32845 36853 43022
09 PM 37768 36524 32080 34475 43022 50105 47017
10 PM 35792 34439 32845 43022 50324 40843 32213
11 PM 49415 32909 36853 50105 40843 31977 40693

Note: the table and graph timings are based on the US-Eastern Time (-5) so adjust your times accordingly. Also the listed prices are for the most expensive type of advertisements (Billboards on 20 international airports).

Autopilot (for FB Airline Manager)

Posted by: Fahad Alduraibi  /  Category: Games, Tricks

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: هذه الصوره توضح موقع ادوات التحكم في الصفحة:
Autopilot-AirlineManager
Version: 1.2.16
If you like my work
, please
consider donating :)
Read more…

طريقة تخصيص اعداد الاوفيس 2007

كتبه: فهد الدريبي  /  التصنيف: Tricks, Windows

إذا كنت تعمل في مجال تقنية المعلومات (IT) او انك ذو المام بتركيب البرامج وتقوم بتركيب برنامج الاوفيس 2007 على العديد من الاجهزة فان هذا الموضوع قد يساعدك في جعل تلك المهمة اسهل بكثير مما اعتدت عليه.

توفر ميكروسوفت امكانية تعديل وتخصيص الاعدادات الافتراضية لبرنامج اعداد الاوفيس (Setup) مما يمكنك من تركيب البرنامج فيما بعد بضغطة زر واحدة، واليكم الطريقة بالصور.