Wednesday, December 30, 2009

Testing Web Applications With a Real URL on local system on Windows

Testing web applications with a real URL on local on windows. Sometimes web apps need to parse the URL and since all real URLS have at least one '.' localhost might not be suitable for testing.



To get around this :



Open the file called hosts its default location is c:\WINDOWS\system32\drivers\etc\hosts or more accurately



%windir%\system32\drivers\etc\hosts

{To get the full path on your system you could type

echo %windir%\system32\drivers\etc\hosts

on a command prompt}



Open it in notepad and add the line at end

127.0.0.1 www.a.com



This is how my file looks


---- start hosts ----

# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

 

127.0.0.1       localhost
127.0.0.1       a.com
127.0.0.1       www.a.com

 

 

---- end hosts ----

Now in any browser goto http://a.com/ use this with my XAMPP-PHP-MYSQL set up on local

It maps to local host. Use it as you would use localhost. If your web server is running on a different IP then you can specify that as in

http://a.com:8080



Comments welcome. thank you

Regards

Tushar Kapila

http://sel2in.com

Java, PHP, VB6 Apps. Fight Back pain: Exercise timer application

http://ksoft7.tripod.com/g3.html search page that allows you to search within any website uses google works best in Internet explorer and opera

http://minutes-alarm.sourceforge.net freeware minute alarm, easy reminder for back ache - stand up or meeting ...


Volunteer computer Cancer cures www.worldcommunitygrid.org

Click: www.thehungersite.com , and www.bhookh.com feed hungry , its free. www.ecologyfund.com

Please add these to your start-up how to: http://tusharkapila.blogspot.com/2008/05/s.html 

Wednesday, December 9, 2009

a list of selected files

You have a few files selected in Windows explorer and now you want the names or paths in a file or in your clipboard.




This utility does that in a jiffy.


Select files, right click and choose to send to this App : CmdLineToDirTxt.exe

It can either save the file names to a file or copy to the clibboard. Either way it looks like this:



just copy it to your send to folder (or open it and make it copy it self)

Download it here: http://code.google.com/p/win-utils/ it is freeware, open source (code is available) Its just an exe but it depends on the Microsoft VB 6 Runtime http://www.microsoft.com/downloads/details.aspx?FamilyID=bf9a24f9-b5c5-48f4-8edd-cdf2d29a79d5&displaylang=en

Tuesday, December 8, 2009

IE Default Print AND I love Java , PHP, VBA, mysql, J2ME, VB6, oracle, linux win 2000+

HEADER
&w&bPage &p of &P
FOOTER
&u&b&d





HEADER


&w&bPage &p of &P




FOOTER

&u&b&d




--------------------------



i love Java. Solve near every problem. Even UI with applets, J2ME and swing.



Java , J2ME mysql, apache web server - with them can solve most business problemns.



VBA - great tool - have delivered more than 10 projects using this language and it has helped with data and analysis with nearly all my other projects (in conjunction with Excel and Word).



VB6 - the full programming part of VBA



Windows 2000 was when windows OS got on par with unix and beat it in usability.



Oracle for showing all that a database can be.
MySql for being free and now powerful too.



J2ME for being easy to put apps on mobile devices



Linux for great performance ++ and all free. I use Ubuntu, burnt it on a CD from windows and made my system dual boot. instructions search



thank you all the folks behind these technologies!



Regards

Tushar Kapila


santaletternow.com   http://sel2in.com

http://stephenbrooks.org/muon1/ Volunteer computer idle time to science
www.thehungersite.com , and www.bhookh.com feed hungry , its free. www.ecologyfund.com
Please add these to your start-up how to: click here

http://www.worldcommunitygrid.org/ Volunteer computer idle time to help find cures for disease and other big world issues supported by IBM and other big corporates

start firefox with a new profile - 2nd session, different set of cookies

you can start firefox in with a new profile

with the option

--no-remote -p tushar



To do this make a new short cut to firefox.exe



then right click the short cut, choose properties



at the end of the Target you will see



\firefox.exe



to this add a space and --no-remote -p tushar



tushar can be your name or any string like profile2



The complete shortcut target in windows XP or Vista will be :

E:\ProgramFiles\Mozilla\Firefox\firefox.exe -p t

(IMPORTANT for the main window which should be started first )



then another short cut to the other firefox exe and with the no remote and other profile name:

E:\ProgramFiles\Mozilla\Firefox\firefox_prod.exe -p prod --no-remote



You can make a copy of your current default profile folder to copy all the settings and change the folder location (make the folder first then select it when you make a new profile) can even have more than two profiles on the same computer



can search in google for more



if you use XP or windows 2000 and do not want both the windows to group, bunch together can makea copy of firefox.exe name it

firefox2.exe and then have the 2nd sortcut point to this exe



REMEMBER

* Making a new profile makes a seperate cookie/ settings folder also will not have old profiles history, saved passwords etc unless you copy the existing profile folder to a new one and choose that new folder as the new profiles folder.



this can be done in the Create Profile step see images:






You this screen by starting firefox with the profile option -p as in :

E:\ProgramFiles\Mozilla\Firefox\firefox_prod.exe -p

















Choose folder

Followers