Friday, September 04, 2009

How to Kill a MySQL Process

Sometimes if your mysql process starts to run at 100% cpu, you need determine which process is taking up the load. In order to do so, use the mysql command line tool and type the command:


show processlist;

From here you can see which query is still running on the mysql instance. The first column shows you the process id. Type the following command to kill it:

kill 12345;

Where 12345 is the process id.

Saturday, July 11, 2009

ISP blocking port 25? No problem!

Is your ISP (cough* rogers * cough) blocking port 25 and preventing your users from using their local email client (Outlook, Outlook Express)? Well, no need to worry. I think the simplest way to get around this problem without having to reconfigure any mail server settings is to allow your users to enable port 26 instead.

Lets start by opening up port 26 on the email server:
iptables -A INPUT -p tcp --dport 26 -j ACCEPT

Secondly, we will port redirect all traffic from port 26 to port 25:
iptables -A PREROUTING -t nat -p tcp --dport 26 -j REDIRECT --to-port 25

Damn, that was easy!

Friday, May 22, 2009

Download YouTube videos

Have you ever wanted to download a youtube video? This post will show you how!

Simply add this link to your favorites or bookmarks: Download YouTube Video

If you have firefox, simply drag this link to your Link Toolbar (bookmarklets).
Now that you have it bookmarked, follow these simple steps:
1. Go to the youtube page for the video you would like to download
2. Click the bookmark that you just created
3. A dialog should popup asking you to save the file to disk.

Ok, so now that you have downloaded the video, how do you play it? Well, YouTube's MP4 videos can be played with applications like VLC, MPlayer, iTunes, QuickTime. If the download video is a FLV file (as some YouTube videos can only be downloaded as MP4 files) then use the FLV Player

Disclaimer: YouTube's terms of use state that you "not to access User Submissions or YouTube Content through any technology or means other than the video playback pages of the Website itself, the YouTube Embeddable Player, or other explicitly authorized means YouTube may designate,". Therefore, use this script at your own risk. I am not liable nor take any responsibility if you use this script to violate YouTube's terms of use.

Enjoy!

Saturday, January 31, 2009

The Dental Centre

A brand new dental website was just launched. Offices are located in Stouffville, Uxbridge, Sunderland and now Port Perry. Dr. Karim Nanji is a great doctor. I wouldn't go anywhere else! :)
Check it out at: The Dental Centre