How to access localhost of computers outside the network

In this guide, I’m going to show you how you can access the localhost of other computers outside or inside your home network.

This guide is specifically intended for people who are working on a website which needs testing from users. Because most of the time the programmer will not see all of the programs defect, errors, or bugs. And only the users can point this out.

 

Wired Connection

For those of you who have wired connection. The method of letting others access your projects for testing purposes would be much more easier. To do this, just go to cmyip.com. Then copy your ip address. Paste it into the address bar of your browser. If you can see something like the screenshot below then it works for you, but were still not sure if it would work for others. So to try it out, just give your ip address to your friends and let them do the same:

image

If it doesn’t work for them. Then maybe who have somehow messed up with your firewall configurations. I won’t recommend you to try and disable it. Because that’s stupid.

To do that, just go to your control panel, and then click on windows firewall. Then click on restore defaults.

image

It will warn you that restoring defaults might cause other programs to not function properly. That’s why I recommend that you create a restore point first. After creating a restore point, just click on restore defaults.

image

Next thing that you need to do is to ensure that ip addresses from outside the network would have access is to configure your http.conf file. Just left click on the wampserver tray icon then select apache, then click on httpd.conf.

image

If its your first time opening the file, then it would prompt you to select a program that you will use to open the file. Just select notepad from the list.

Now, press ctrl+H on your keyboard to launch the find and replace tool in notepad. And type:

</di

image

You have to modify the part enclosed in <directory> tags. Replace the Deny from all with Allow from all. The text enclosed in <directory> tags will now look like this:

<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Allow from all
</Directory>

Just save that one and then restart your wampserver. Others should now have access to your localhost, and they can now test your projects.

Last thing that you’ll need to do is to make sure that you’re server is actually online.

image

If you can see that the text in there is Put Offline. Then yours is already online. And ready for access from the outside world.

If you want to protect your codes from being downloaded. Then you have to put index.php file on every folder of your project. Be it javascript or css. But the most important are the php files.

If you didn’t then your testers might see something like this:

image

And its not cool. I’m telling you. Because if they see that one. They can download it.

 

Wireless Connection

This part of this guide is intended for those who have laptops or desktop which connects to the internet via router or wireless hotspots or wi-fi. The ip address that the people from outside the network will use to access your localhost is the ip address that you can see in cmyip.com.

There are few things that you need to do which I already mentioned at the top. So do these things first before you continue:

  • Edit your httpd.conf
  • Make sure your server is already online

If you’ve done that then fire up your command line by typing cmd on the search bar.

Type in ipconfig/all

You’ll see something like this(Sorry but if I’m taking precautions here. I’m not actually gonna show you whats my ip address and everything:

image

You’ll only be concerned with the value of the ipv4 address in here. Just paste that ip address into your browsers address bar. If it doesn’t work then you might need to configure your router as well.

Here’s how to configure your router. Just go type 192.168.1.1 or 192.168.1.0  on your browsers address bar to access your router settings.  The usual username and password would be admin.

Go to forwarding, then add the ip address which you have copied from the command line a while ago. And paste it into the textbox which requires the ip address. Then type 80 on the port. Port 80 is the port that is commonly used. But if you’re accessing your web directory through a different port, then use that port. Make sure you enable this configuration so that the port forwarding will work.

 

Conclusion

That is how you access localhost from other computers. Its just easy and I think it’s a nice tool for letting others see and test your work without having to host it on an actual server.

How to stay safer on the internet

In this tutorial, I will show you the ways on how you can be safer while connecting to the internet. Whether you are connecting to the internet via an unsecured wi-fi hotspot or a wired connection, it doesn’t matter because the tips that I’m going to show you here is applicable for both connection types.

 

WOT

-Short for Web Of Trust. It is an add-on which can be installed on a browser. Its main role in life is to determine the authenticity and safeness of a website.

You can see the rate of a website by looking at the color of the WOT icon.

  • Red- Very poor
  • Orange –Poor
  • Yellow- Unsatisfactory
  • Light Green-Good
  • Green- Excellent

To download WOT, just go into their site:

http://www.mywot.com/en/download

And as you can see from this screenshot, it can be installed on the 5 major browsers:

  • Google Chrome
  • Internet Explorer
  • Mozilla Firefox
  • Safari
  • Opera

image

 

 

HOSTS File

You can also be safer by editing your hosts file. You can find the hosts file by navigating to:

c:windowssystem32driversetc

All you need to do now is to replace your original hosts file with this one:

Don’t worry it is safe, if you will examine the file carefully. You will find that most of the sites that are in there are advertisement sites like infinity ads. Which isn’t really that useful for us users, and those sites might even contain malicious code in them, so its better if we block our computer from being able to access it.

If you have other sites that you wish to block, like the time waster facebook.com. You can do so by adding this line at the end of your hosts file:

127.0.0.1 www.facebook.com

If you don’t know what 127.0.0.1 is, then it’s the localhost. Which means that you are blocking the site which is beside it, in this case facebook.com from the localhost or your computer itself.

 

 

ANTIVIRUS

This is already old, but still worth mentioning. Antivirus software is not mandatory if you use your common-sense while using your computer.

But still its good to have one installed on your computer to back you up in case you suddenly slipped into browsing a malicious site.

Free antivirus software will do, if I’m going to recommend you one, I’d pick the two below:

    • Avast Free – The interface is the main reason why I pick this. But the protection is also good.
    • MSE – Most of the people at howtogeek and lifehacker recommends this one. And I’m currently using it.

 

 

ANTIMALWARE/ANTISPYWARE

Definitely needed, tracking cookies and flash cookies exists everywhere in the internet. If you don’t want to have this cookies lurking on the insides of your operating system. Then you must use these two:

    • MBAM –Malware Bytes Anti Malware. This one is recommended by our school. It really has nice detection rates when it comes to spyware and other malwares.
    • SAS –Definitely SUPER. I use this one every time and it never fails in detecting different kinds of cookies and malware.

 

 

NOSCRIPT

If you want to be totally secured ,then you should use NoScript, an extension for firefox used for blocking javascript, java, flash and other web plugins. Of course this would mean a boring web experience, but this way you would be totally secured. You can also enable javascript, java, and flash for sites you consider safe.

Here’s the link to NoScript.

 

CUSTOMIZE BROWSER

You can also customize your browser so that it would disable javascript, images, flash, cookies, plugins, pop-ups while you are browsing. This is similar to installing NoScript. But without installing anything which would consume an additional amount memory on your system.

In Google Chrome, all you have to do is to click on the wrench icon on the upper right corner of the window and select options.

After that, go to the ‘under the hood’ tab. Under the ‘privacy’ section, click on the ‘content settings’. This is now easy, all you have to do now is customize the options and you’re good to go.

image

 

 

CONCLUSION

That is all I have to say about staying safe on the internet. The most important aspect of staying secured on the internet is still common sense. You can have the most expensive antivirus in the whole world but if you don’t apply your common sense while browsing then you’re still not secured.

Customize Nero 8 installation

When I install Nero 8 I only install the Start Smart Essentials which is the one that I need. This way, I could minimize the amount of disk space that the program would consume. You can also apply it to other programs if you think you cannot use all of the features of the program that you’re going to install.

image

You can also customize it at a later time, if you think there is one feature that you have missed and  haven’t installed.

How to use applications without installing them on hard drive

Yup, the title really sounds like awesome huh? But what I’m going to tell you is just a simple little trick that I have discovered while using the program called Sandboxie. Which I mainly use for executing browsers, explorer window, and programs in a safe-mode way. Meaning, isolated from the operating system. In other words, viruses, malware, and other nasty stuff couldn’t get in the operating system. Well, that’s only in my opinion. But I still believe in the power of Sandboxie after about 4 years of using it.

You can actually use Sandboxie in many different ways. And what I’m going to tell you in this article is how to use it to use application without actually installing them on your hard drive. Just installing it in the computer memory or RAM by using the virtualization power of Sandboxie.

  1. First thing that you need to do is of course to download sandboxie. If you don’t already have it.
  2. Install it. 
  3. Right click on ‘Computer’ then select ‘run sandboxed’.
  4. You’ll now have a sandboxed version of the windows explorer. Now you need to navigate on the file that you want to install. Then install it.
  5. Of course, there won’t be any start menu or desktop shortcuts that would be showing up on your ‘unsandboxed windows explorer’. So what you’ll need to do is to navigate to ‘Program Files’ using of course, the sandboxed explorer window.
  6. You can now execute the application, however, just ignore any prompt that Sandboxie will tell you which regards to recovering the files that you have just installed. But for example, you installed an archive extracting application like 7-zip or Pea zip. Then you used it to extract files, then you should recover those files, but only those files that you extracted. You should be able to recognize it by means of common sense.

Note: Not every application may work. I don’t have a list right now but I’m going to list every application that I have tried someday. Applications installed using this way may also be a little unresponsive but still better than installing them in a virtualbox especially if you’re low on system memory.

Conclusion

That’s how you can use Sandboxie to use applications without actually installing them on your hard drive.

Download youtube videos the easy way

If you don’t have greasemonkey already installed on your firefox. Go ahead and install it.

Restart firefox.

Now go to YouTube HD Ultimate.

And install the userscript. You will now be able to see download links to the video you are currently watching:

image

Note: You can bypass the installation of greasemonkey when you’re using Google Chrome.

How to print directory contents using command line

There are tons of applications for windows that allows you to print the contents of a directory to a text file.

There’s karen’s directory printer. Its easy to use, but  it requires installation. Isn’t it better if you’ll be able to print the contents of a directory without having to install anything?

Enter, the command-line. Here’s how you can do it in windows:

dir>filename.txt

You will come up with a file like this:

08/19/2010  08:56 AM        78,925,456 Naruto100.avi
08/19/2010  09:37 AM        71,677,282 Naruto101.avi
08/19/2010  09:43 AM        78,955,496 Naruto102.avi
08/19/2010  09:49 AM        71,761,418 Naruto103.avi
08/19/2010  09:55 AM        78,765,556 Naruto104.avi
08/19/2010  10:01 AM        71,830,582 Naruto105.avi
08/19/2010  10:06 AM        78,968,464 Naruto106.avi
08/19/2010  10:13 AM        78,839,558 Naruto107.avi
08/19/2010  10:20 AM        78,829,924 Naruto108.avi
08/19/2010  10:26 AM        71,820,024 Naruto109.avi
08/19/2010  10:32 AM        71,726,376 Naruto110.avi

As simple as that. If you are using windows vista or windows 7. Its even more easier. Just press ‘shift’ on your keyboard then right click the directory/folder that you want to print out its contents. Then select ‘open command window here’.

A command line window will open up, with the corresponding location. And if you want that only the filenames will be printed. Just type:

dir b og>filename.txt

b and og are parameters for the dir command that omits the date when the file was created and its size. Thus producing an output like this:

Naruto100.avi

How to set environment variables

Remember ‘set path’ and ‘set classpath’ when you need to access certain functions of an application from the command-line?

Something like:

set path=C:Program Files (x86)Javajdk1.6.0_18bin;

set classpath=C:Program Files (x86)Javajdk1.6.0_18lib;

When you’re doing java.

I still remember someone from my class patiently typing those series of words just to be able to compile a java program and execute it.

In this tutorial , I will show you how to apply one of the virtues of a programmer (laziness).

First, you need to click on the start orb, and right-click on ‘My Computer’ then select ‘properties’.

After that, go to ‘Advanced System Settings’, click on the ‘Advanced’ tab, then click on ‘Environment Variables’:

image 

Under ‘System Variables’, scroll down until you see ‘Path’:

image

Highlight that then click on edit:

image

Go to its rightmost part by pressing the right arrow key on your keyboard, then put a semi-colon:

You can now include that path to the javac compiler, or any application function you wish to have access to when you use your command-line.

For java, you can do something like this, on 64-bit system, if you’re running 32-bit then just remove the part  ‘(x86)’, or better yet check on your program files directory, then search for ‘java’ folder:

C:Program Files (x86)Javajdk1.6.0_18bin;

C:Program Files (x86)Javajdk1.6.0_18lib;

You can do this to almost any application, if you’re using yii as your php framework, then you can just add the directory to which your yi framework is installed:

D:Programswampwwwyiframework

Always remember to separate the paths with a semi-colon.