Adding eclipse project to github

Following are the steps to add projects to github . Though i have written this for eclipse projects, actually this works for any projects.

1. I assume you are having git installed in your pc, else first download and and install git from here .

2. Browse to your project folder and type

git init

3. Now let git know where you want to send your content. Type the following

$ git remote add origin[GIT user id]/[projectName].git

4. Now that git knows where you want to send your project , another 3 simple things you have to do. Add the actual project, commit to local git and finally replicate the change to github.

git add .   # this adds all the files
git commit -a -m "Initial commit" # this is for local commit. 

git push -u origin --all # finally :)

5. Remember git will ask for your github user id and password.

Strange issue in gcc windows

Last week I came across a strange situation in gcc for windows. I have written some c++ codes in linux where some of the function bodies i kept in header files only.

like this

class temp


string m;


void setm(string param){ m = param;}

string getm(){ return m;}



This is working fine when compiled and used in linux. But when I use same gcc version in windos 64 , it compiles but crashes at run time as it couldn’t locate function bodies. Will look into this farther .

Joomla Content editors tool


How many times your content editor/submitter used some wrong html rules in your site content?

For me, the answer is numerous times. I used to be anxious each and every time, he logged in. I d

eveloped a joomla based CMS site for our company, once the site is launched I moved to other projects. But every now and then they used to call me as some pages are looking different. This is because our beloved content editor has used some new kind of fonts and text rules which were not used anywhere in the site. Yes yes,I know there is tinyMCE . But problem is when you are copying from multiple sources and pasting into your article, your article(in this case I mean joomla article) becomes very clumsy. In this situation, if apply your desired style rule using tinymce , the result may not be good.

So the best way is to

  • Remove all HTML styles.
  • Get the clean text
  • Now apply your text rules.

But again,our dear content editor may be a bit lazzy. So thats why I planned a tool for him. Its a simple two file application, you may marge it into one file too. The concept is this :

  • There is a text box where he has to paste the text
  • The script will remove all previous styles from the text and apply new styles as defined inside the script.
  • Regular expressions matching is used to apply special rules for specific words.

What it does is :

  • It removes all styling but keeps newline characters and paragraphs.
  • It converts everything to arial and with the selected font size.
  • it searches inside the text , and converts every occurrence of foo into a orange coloured foo.  You may use this feature for your brand name.
  • It also applies different styling for the title.

So thats it. Download the files, put them in your apache’s web folder and run. Please feel free to modify the codes as per your need.

Download Source Files

{ This was published previously on my old blog in college days. Please don’t judge me by this code. I know it’s kinda messy 🙂 }

Care for an opinion ? check

Many of us love to make perception about stuffs or people based on polls. Polls are always an integrated part of our lives. Online poles are relatively new. But they are respected by most of us, as to most of us, real life and online persona nearly converged. Whether robert vadra has really did some mischief or not, netizens will use two separate ways to form their opinions. Some of us would be ready to read few thousands words long articles on that issue, others will simply look for relevant opinion poles . So if you belong to the second tribe , I suggest you spend some time in  .

1. Central Idea : You will be presented with plenty of poles based on your interest . Each pole appears in a flash card like interface. You can either cheer or boo 🙂  Of course you can through a few lines on your choice. Thats it, nothing more.

2. Interface : If you have used pinterest then you are already familiar with it. It’s very clean and precisely informative.

3. Other : it’s still in beta. lets see what all going to be added in final version.

My words : A refreshingly new attitude towards poles. Hats off to them for representing some boring pieces of percentages in a attractive way.