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
T.

Toshiba M200 and Standby

I found a neat trick to fixing the problem with resuming from standby on the M200 when using updated video drivers.

My setup:

– Windows 7 x86 build 7100

– Forceware 98.16

– Dual Displays enabled (see other posts)

The trick:

After resuming from standby press Fn + F5, the switch display function, twice. This will cause your computer to attempt to switch to the secondary display and then back again to your primary display which will reinitialize your screen.

I haven’t done enough testing on other setups to say that this will work for everyone, I’d imagine that so long as you have the Dual Display trick enabled you should be able to do this.

O.

Ohhh Cellular-Ma-Fone.

I lost Samsung u740 two days ago and I’ll be honest… I feel mildly useless with out it. I mean I didn’t store anything incredibly important on it besides my contacts, but still! I’ve already run into situations while on the road or away from home where I’ve needed a phone… so terrible. But to top things off, I burnt myself on a Shindaiwa T230 trimmer on the same day!

But on the bright side I bought a HTC Touch Diamond on eBay for like $200, which is pretty damn good considering my retarded cellular company sells them for well over $400. What I did find the most interesting about those retards is they only use the location feature to find your phone in the case of an emergency (normally for the paramedics to find you) and it requires a court order. But I have to wonder… why do I (the owner of the phone) need to have an emergency and a court order to find my own phone? Their response: Wut?

I did however learn something from them about the streaming radio issue I previously had with the Samsung u740. The other cellular company they were partnered with provided an RTSP relay in the network which solved the problem of not being able to use RTSP streaming. Since they are no longer partnered… no more relay, but is my cell company going to fix it? Apparently there is no estimated on a fix for the ‘issue’. Fantastic.