Windows 8.1 Update brightness fix

I installed Windows 8.1. It is a wonderful update and its FREE. I would suggest everyone to update to Windows 8.1 if you like enhanced search features, a lot of personalization, IE developer tools and so much more. When you upgrade, it can happen that you might suddenly face brightness issue. Happens mostly in Lenovo.

Here’s what you can do:

  • Control Panel -> Device Manager -> Intel HD Graphics 4000 -> Driver (tab) -> Update Driver -> Browser my computer -> Upgrade to a lower version and this will work


Git with Notepad++

I am sure all developers love git and notepad++ as a editor. When you are doing web development on windows, its boring to go to the git bash to commit your files. But, there is a convenient way to commit files from notepad++ itself.

Here are a few steps to use git and commit your files from Notepad++:

  • Download and install¬†Tortoise Git
  • Download and install mysysgit
  • Download the dll file for git on notepad++ from here
  • Drop the .dll file into the plugins folder of notepad++
  • One thing to make sure, you must already have committed repo in your computer
  • So next time whenever you commit from notepad++, it can recognize the file structure and all you got to do is to enter username and password
  • Open Notepad++, Plugins -> Git -> Commit File
  • Put your commit message and rest is simple (username and password)

Done ūüôā


Easy way to configure hadoop on Eclipse (Use it on Eclipse)

Using Hadoop with Eclipse:

  • In Eclipse, go to File, New -> Java Project
  • Once project is created, Right click on your project -> Build Path -> Add External Jars

The following jars are required to be added to your project:

  • hadoop-core-1.0.3.jar
  • hadoop-eclipse-plugin-1.0.3.jar

You can find these jars here: Depending on the hadoop version, you can download.

Thats it ūüôā

Install Hadoop in just a few steps – Extreme Computing

I am going to show you how I installed Hadoop for doing some distributed operations in just a few steps. I am using Ubuntu 13.04 on a Windows Azure VM:

  • Extract File¬†& Rename Folder to Hadoop:
    tar -xzf hadoop-1.2.1.tar.gz
    mv hadoop-1.2.1.tar.gz hadoop
  • You must have Java Install (1.5+). I have Java 7 installed.
  • Next step is to set the Java path as Hadoop requires java & also set the Hadoop Home:

    vim ~/.bashrc ( I am using vim as a editor but you can use any editors you like such as emacs, nano etc)The below paths will change for you as you might have a different location where hadoop is installed & the java version.export HADOOP_HOME=/home/cube/hadoop #where you extracted the hadoop from Step (2)
    export JAVA_HOME=/usr/lib/jvm/<java-version> #Go to till jvm folder and check the java version
  • Check if hadoop is installed by going to the hadoop folder & type:

    bin/hadoop versionYou might see something like this:
    Hadoop 1.2.1
    Subversion -r 1503152
    Compiled by mattf on Mon Jul 22 15:23:09 PDT 2013
    From source with checksum 6923c86528809c4e7e6f493b6b413a9a
    This command was run using /home/cube/hadoop/hadoop-core-1.2.1.jar
  • Configure Hadoop using an XML File. Common properties go in core-site.xml, HDFS properties go in hdfs-site.xml, and MapReduce properties go in mapred-site.xml. These files are all located in the conf subdirectory.

Delete the contents of core­site.xml and copy­and­paste the following into the file:

             Delete the contents of hdfs­site.xml and copy­and­paste the following into the file:

             Delete the contents of mapred­site.xml and copy­and­paste the following into the file:

  • Configuring SSH
    In pseudodistributed mode, we have to start daemons and to do that, we need to have ssh installed.
    sudo apt-get install sshThen, to enable password-less login, generate a new SSH key with an empty passphrase:

ssh-keygen -t rsa -P ” -f ~/.ssh/id_rsa

cat ~/.ssh/ >> ~/.ssh/authorized_keys
Test this with:
ssh localhost
If successful, you should not have to type in a password

  • Formatting HDFS Filesystem
    Before it can be used, a brand-new HDFS installation needs to be formatted. The formatting process creates an empty filesystem by creating the storage directories and the initial versions of the namenode’s persistent data structures.
    hadoop namenode -format
    You should see all of these process names but with different number IDs.2287 TaskTracker
    2149 JobTracker
    1938 DataNode
    2085 SecondaryNameNode
    2349 Jps
    1788 NameNodebin/


Quick Way to add new changes to your existing Github Repository

Here is a quick way for adding changes to your Git:

  • git init¬†
    Initializing existing git repository. Your current folder should be the git’s main folder
  • git add .
    Adds all changes made
  • git commit -m ‘<comment>’
    Commits all the changes made with specific comment
  • git pull origin master
    Gets the latest version of the repository
  • git push origin master
    Pushes changes to the repository. Username & Password is required.

There you go!

Install 2 web servers on same machine – Change Ports

You are most likely to have 2 web servers installed – 1 can be IIS and other can be Apache. The default web server port is 80 and its called localhost. If you install another web server on the same machine, the 2nd web server by default also has a port of 80 and is called localhost so its more likely that the second web server stops working. If you try to re-start, it would not do that because its trying to load on some port which is already taken.

In this scenario, the best way is to change the ports. I will tell you what you should be doing for IIS and Apache.

To change the IIS port:

Check the snapshot and instructions below:

2013-07-21 12-48-23 AM


  • Go to run -> type inetmgr, it opens the IIS manager
  • Select the Web site that you wish to configure (eg: Default Web Site)
  • In the¬†Action¬†pane, click¬†Bindings
  • Click¬†Add¬†to add a new site binding, or click¬†Edit¬†to change an existing binding
  • Click¬†OK¬†to apply the changes

To change the Apache port:

  • Go to the directory where you installed wamp.
  • Go to¬†D:\wamp\bin\apache\apache2.2.22\conf. Version changes as per what version of apache you installed but basically, it looks like that
  • You will see httpd.conf, ¬† and those are the files you got to change. Open that in a notepad, search for localhost. You need to search “localhost:80”.
  • Change that 80 to 81. It means you are changing ports and asking apache localhost to go to 81 and setup itself
  • Restart your web server
  • Next time, you go to the browser and say: localhost:81/index.html to connect to the file you want.

Important Tip

  • By default, your web server is called localhost. Above you changed ports, so while accessing your website you need to check which localhost your web app is installed
  • Accordingly, type: localhost:80 <- by default or localhost and it connects to port 80 or type localhost:81 if you have changed ports.