Archive

Author Archive

How to fix the Ubuntu GPG Error BADSIG

June 8th, 2010 Khalil Majdalawi No comments

If you are seeing Ubuntu GPG Error BADSIG use the one of the following methods to fix

Error Message:
W: GPG error: http://archive.canonical.com intrepid Release: The following signatures were invalid: BADSIG 40976EAF437D05B5 Ubuntu Archive Automatic Signing Key

Try to run the following commands from terminal

sudo -i
apt-get clean
cd /var/lib/apt
mv lists lists.old
mkdir -p lists/partial
apt-get clean
apt-get update

source

Categories: Linux Tags:

Dante’s Inferno

April 12th, 2010 Khalil Majdalawi No comments

Just finished playing this game , check this awesome ending

EA refused to sell it in ME , after playing it i think they did right decision , cuz if they did they will face more than such acts



but overall this game rocks , i will start playing GOW and will see which is better ,

Update: thanks to friend and google it appears that the protest above just an EA publicity stunt , well they have balls to do such thing source

Categories: Electronic Games Tags:

How restore a MySQL .dump file

December 31st, 2009 Khalil Majdalawi No comments

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

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

Categories: Uncategorized Tags: ,

Delete .svn folders recursively using command line

October 5th, 2009 Khalil Majdalawi 5 comments

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 {} \;

How to get client MAC address in PHP

July 4th, 2009 Khalil Majdalawi 1 comment
<?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

Categories: Internet, Linux, PHP, Web Development Tags: