I do a lot of local development with Internet Information Services and either ColdFusion, PHP or ASP.net and for the longest time I would actually run the websites on separate ports on 127.0.0.1.

Unfortunately running multiple websites on various other ports causes some issues like:

  • Port conflicts with other programs
  • Remembering which port is used for what website
  • Causes problems with some websites that look for port 80
  • Doesn’t really work with SSL (port 443)

So what I started doing was running my websites on separate private IP addresses which are local to my machine only, and this worked GREAT! I could load up websitexyz, bind it to IP 1.1.1.10, setup SSL to work on port 443 for 1.1.1.10 and I would go about my business.

The only downside was when I would run out of IP addresses, because I would only add about 5 to 10 IPs at a time to my local loopback adapter. It is a bit of a pain in the butt to add a bunch of IP addresses in Windows, so it would take me a bit of time to do this everytime I needed more IPs.

That was until I ran into a small batch script which can add as many IP addresses as I want in a range.

Here’s the code:

FOR /L %A IN (41,1,100) DO netsh interface ipv4 add address “ColdFusion-IIS” 1.1.1.%A 255.255.255.0

Simply copy that into either a command prompt or a .bat file and run it to add as many IP addresses in a range that you want.

Here’s the break down of the script:

FOR /L %A IN (START,INCREMENT,END) DO netsh interface ipv4 add address “INTERFACE_NAME” IPMASK SUBNET

If we take a look at my script above we see that

  • START = 41
  • INCREMENT = 1
  • END = 100
  • INTERFACE_NAME = ColdFusion-IIS
  • IPMASK = 1.1.1.%A
  • SUBNET = 255.255.255.0

What this basically equates to is adding 1.1.1.41 to 1.1.1.100 to my network adapter called ColdFusion-IIS.
It is a super handy script and saved me a bunch of time, I would recommend it 10/10 for local development.
Previous Article
P.

PHP PhotoGallery + Slimbox 2

I decided to make my own php photo gallery that dynamically renders thumbnails and such, but also uses Slimbox 2 to display the full image.

Download

Installation is easy, just copy and paste the files into your image directory and it will go on it’s own. You can edit the index.php file to change some settings which mainly is just for controlling the images themselves. You can also edit the template.html file in the ‘data’ folder to change the overall look of the page.

I don’t have a demo yet, but I’m working on uploading some pictures now which I’ll use as a demo.

T.

Toshiba M200 + Vista Ultimate = ?

Well they don’t have a word for it yet.

But anyway, I did indeed install Vista on my lowly Toshiba M200 (exact specs except I have 1GB of DDR, soon to be 2GB). So far, I’m quite impressed at the overall performance of the machine, the system lags a bit more then XP did but the functionality and ease of use went up. I’m thoroughly impressed with the Vista Tablet functionality vs XP Tablet.  Surprisingly enough, my frame rate in World of Warcraft (yes it can play on the M200) is pretty much the same as it was in XP.

One thing I noticed right away was the responsiveness of the Tablet Pen, it seems to have increased quite a lot. I also combined that with OneNote 2007 which with the improvements from 2003 has made my note taking a lot more easier.

Would I recommend upgrading to Vista on the M200?

Sure. Make sure that you have at least 1GB of memory however, and I’d recommend installing Vista from a folder on lets say a network or USB drive. The reason for this is the 24x External Toshiba drive sucks for transferring files, if you go that route be read to spend a good 1-2 hours getting to the “Installing” screen. I installed Vista from XP from a folder on my network storage. Took about 1 1/2 hours to install from the time I first ran the installer to when I could first login to the machine.

I will say that anyone who wants to upgrade will need 2 things:

And that’s it, Vista will take care of the rest. If you download/install anything else from Toshiba, you’re installing too much redundant/old software. I say you should download Toshiba Tablet PC Button Driver because it contains the drivers needed to change the Display Brightness and Rotate the screen. Once installed you can use the Vista Mobility Center (press Windows Key + X) to rotate the screen and change the Display Brightness depending on your power status.
Mobility Center
Mobility Center