Archive

Author Archive

How restore a MySQL .dump file

December 31st, 2009

i always forget how to do it so here it is to remember :)

mysql -u<user> -p<pass> databasename < db_backup.dump

Khalil Majdalawi Uncategorized ,

Delete .svn folders recursively using command line

October 5th, 2009

some times i work on small projects with friends and we use Subversion to track and store code changes, collaborate, and share project files so once we finish we usually upload it somewhere by copying the whole project folder so i face that subversion makes folder inside each folder in the project called “.svn” and that take time to remove manually and unnecessary size to upload
so i run a command inside the project folder to remove that folders recursively before upload.

Run this:

find . -name .svn -exec rm -rf {} \;

Khalil Majdalawi Linux, Web Development , ,

How to get client MAC address in PHP

July 4th, 2009
<?php
exec('arp '.$_SERVER['REMOTE_ADDR'],$user_mac);
echo substr($user_mac[1],strpos($user_mac[1],':')-2, '17');
?>

Note : this technique only works on local area networks with linux based server and its impossible to get mac address in php over internet

Khalil Majdalawi Internet, Linux, PHP, Web Development

windows 98 still alive

July 2nd, 2009

today i was shocked as my daily blog check, i noticed someone or “something” is actually still use windows 98 & IE5 WTF ?! this person “zombie” should be jailed of illegal use of internet or send him back to hell .


traffic_from_win98


i wonder if there any version of firefox for windows 98 he could use?!

Khalil Majdalawi Internet, windows , , ,

Mount and Unmout ISO Files in Ubuntu

June 15th, 2009

Mount ISO File

First you need to make the directory to put the ISO file into using the following command

sudo mkdir /media/isodir

Then use following command

sudo mount your_image_file.iso /media/isodir/ -t iso9660 -o loop

Now you should have your iso file mounted, and accessible from your desktop.

Unmount ISO File

Just use following command

sudo umount /media/isodir

Khalil Majdalawi Linux ,