Installing OpenGL Development Environment in Ubuntu

1. Download OpenGl liberies

sudo apt-get install freeglut3 freeglut3-dev
sudo apt-get install binutils-goldc
sudo apt-get install libglew1.5

2. Create a test file (test.c):


//Drawing funciton
void draw(void)
  //Background color
  //Draw order

//Main program
int main(int argc, char **argv)
  glutInit(&argc, argv);
  //Simple buffer
  glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB );
  glutCreateWindow("Green window");
  //Call to the drawing function
  return 0;

3.Compile the file linking the OpenGL/Glut libraries:

gcc -lGL -lglut -lGL -lGLEW test.c -o test 


g++ -I/usr/include -L/usr/lib -lglut -lGL -lGLU -lGLEW 

4. Configuring with eclipse

  1. Donwload and ADD CDT plugin for eclipse. Download Link
  2. After installing CDT, go to eclipse’s Menu, Projects->Properties
    From leftside bar, Expand C/C++ General->Path & Symbols
  3. Go to libraries add this four lib one by one ( glut, GL,GLU, GLEW ) .
  4. Now try to build and compile your code

git Deploy/Export

Probably the simplest way to achieve this is with git archive. If you really need just the expanded tree you can do something like this.

git archive master | tar -x -C /somewhere/else

Most of the time that I need to ‘export’ something from git, I want a compressed archive in any case so I do something like this.

git archive master | bzip2 >source-tree.tar.bz2

ZIP archive:

git archive --format zip --output /full/path/to/ master 

From a repository, you can do:

git checkout-index -a -f --prefix=/destination/path/

git archive also works with remote repository.

git archive --format=tar --remote=ssh://remote_server/remote_repository master | tar -xf -

Backup Your Hosting Database Via Cron Job

Get Your Database Hosting Address , Name , Username and Password

mysqldump command is used for dumping a mysql database.

Set up a cron job with this command as follows,

Please change required parameter with your own.


mysqldump -h (hostname) -u (user-name) -–password=(password) (database-name) > (full path of backup file)


mysqldump -h -u testebdb -–password=password mytestbdb > /home/content/q/a/b/testchep/html/backups/daily.sql


WordPress “comment_class” filter

Filters :

comment_class :

Calls when comments are displayed in a post, it is called for generating the css classes for the comment block.

You can add your css class with them to highlight a comment or do any customization you want.

How to use :

Register the filter :

add_filter('comment_class', "test_function", 1 );

Define The Function :

function test_function($classes)
     classes[] = "my-css-class";
     return $classes;

Wamp(Apache) problem with skype.

There is a common problem who use both wamp and skype at the same time, found that wamp is not working or skype is not logging in.

This happens because wamp and skype both uses port 80 to run the server.

Sometimes it will work if wamp is started first and then skype started, as skype will see that it is failing to connect in port 80 it will use another port.

But in reverse case, wamp always use the port 80, so it will not start [ wamp icon remains stuck in yellow ] .

To fix this you need to change port no. of one of them to other then 80.

Changing Port No. of Wamp :

1. Open httpd.conf file located at “[Wamp Installation Path]\bin\apache\Apache2.2.17\conf\

Default Wamp Installation Path : “C:\wamp\”

2. Find “Listen 80” in the file.

3. Change the default port 80 to 81 or any other port you want, just make sure no other application use that port to connect.

Changing Port No. of Skype :

1. Go to “Tools> Options > Advanced > Connection”

2. Uncheck “Use port 80 and 443 as alternatives for incoming connections”.

3. Click Save.

It’s recommended to change the port of skype as changing wamp will give you some pain as then you need to explicitly specify the port in every request.

Steps of making a windows sidebar gadgets

In general, the steps for creating a gadget are:

  1. Create a folder named “YourGadgetName.gadget” in any of below location you prefer. (Or you can create it on any other location but for installing, you need to copy it one of the below locations).(for user gadgets)
    %USERPROFILE%\AppData\Local\Microsoft\Windows Sidebar\Gadgets

    (for global gadgets)

    %SYSTEM_ROOT%\Program Files\Windows Sidebar\Gadgets (for global gadgets)

    The following image shows a gadget development folder in the %USER_DATA%\Local\Microsoft\Windows Sidebar\Gadgets folder.Example of a gadget development folder

These practices ensure the gadget appears in the gadget picker with minimal subsequent file handling.

  1. Create the manifest file and save it to the development folder. For more information on the gadget manifest, see Gadgets for Windows Sidebar Manifest.
    <?xml version="1.0" encoding="utf-8" ?>
      <name>SDK Shell</name>
        <host name="sidebar">
          <base type="HTML" apiVersion="1.0.0" src="HelloWorld.html" />
          <platform minPlatformVersion="1.0" />
  2. Create the “HelloWorld.html” file and save it to the development folder.
            <meta http-equiv="Content-Type" content="text/html; charset=Unicode" />
            <div id="gadgetContent">
  3. Install the gadget, if necessary.Depending on where you created your development folder, you may need to copy the folder or its content to one of the two previously identified Sidebar system folders. Alternatively, you may want to package the gadget for general distribution and test the gadget installation process. For more information on installing and updating a gadget, see Gadgets for Windows Sidebar Updating and Refreshing.
  4. Test the gadget and make revisions as necessary.

Note : You can use javascript along with  thrid party frameworks , CSS styling and many more web programming feature.

Source :

CodeIgniter Autocomplete [ Intregrate CodeIgniter With Netbeans]

To Get The Magic of Auto Complete in CI in Netbeans or other IDE

Setp 1 :

Download Fake Controller Function.

Download the zip file for CI 2.0

Download the zip file for CI 1.7.x

Step 2 :

Extract the zip and copy this two files



Paste it in any directory in your project.

It looks clear if you place in nbporject  directory as then this fake files will not be shown in main project source tree. However Placing it anywhere inside the project will work.

Download Entire Website Via IDM (Internet Download Manager).

It is easy to download entire website via IDM.
Go to Task in IDM menu. Click on Run Site Grabber.
Follow through the wizard and the grabbing will start immediately .

Note : IDM is not free. Its trail lasts for 30 days.

Don’t use (exe) cracks .

I will let u know how to restart the trail period later.