Disable Supernode in Skype

What is a Supernode?

Skype uses peer-to-peer communications in order to allow users to find one another. Consequently, a small percentage of our users will hold a record reflecting the online presence of other users. When one user holds a record concerning the presence of other users, the former is called a “supernode”, or directory node.

Even though the traffic sent to supernodes is negligible, some institutions are interested in preventing users on their network from becoming supernodes and, thereby, answering directory enquiries for other users.

How can you avoid becoming a Supernode? According to the Skype website…

  • Beginning with Skype 3.0, an explicit switch is provided in the registry settings to allow the disabling of supernode functionality.
  • Any computer hosted on a network that is behind a network address translation (NAT) device or restrictive firewall will disable supernode functionality.
  • Skype clients behind an HTTP or SOCKS5 proxy will not serve as supernodes.

How to disable super functionality via the registry

Create a textfile called fixskype.reg

Inside this file, paste the following four lines. Then save, right click this file and select Merge.

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Skype]
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Skype\Phone]
"DisableSupernode"=dword:00000001

Useful MySQL Shortcuts

A couple of things I currently do to speed up my day to day usage of MySQL…

1. I have a shortcut on the desktop that logs me straight into MySQL. This one is pretty easy, make a shortcut to the mysql.exe on the desktop, then edit the shortcut and add the options for username and password. For example:

"C:\program files\mysql\MySQL Server 5.5\bin\mysql.exe" -uusername -ppassword

2. I have to drop the database quite often, our system regenerates and loads a new one if its not there so for testing this is something I do often.

First, make a file called drop.txt.

Inside this, put the following:

drop database mydatabase;

Secondly, create drop.cmd and inside, add this:

@echo off
echo About to drop the database... Are you sure?
pause
"C:\Program Files\MySQL\MySQL Server 5.5\bin\mysql.exe" -uusername -ppassword < c:\pathtodropdottext\drop.txt

The pause is there to give you a chance to abort. You could easily alter this setup to run other sql statements if you need to.

Simple Script to Restart IIS and MySQL

This is a quick way of restarting IIS and MySQL. Simply create a .bat file with the following text then run as Administrator… or create a shortcut to the batch file, edit the properties and select Run As Administrator from the advanced options.

@echo off
echo Restarting IIS...
echo ======================================================
net stop "W3SVC"
net stop "MySQL"
net start "MySQL"
net start "W3SVC"
echo ======================================================
echo IIS Restarted