Category Archives: Programming


How to Install Nginx web server on Ubuntu 12.04/12.10

Nginx is a lightweight web server (HTTP, SMTP, IMAP, POP3 ..). It has very low memory footprints with higher degree of concurrency. It’s a free and open source software, runs on all major OS (Unix, Linux, BSD, Mac OS X, Microsoft Windows and more).


Setup Nginx on Ubuntu (12.04) LTS Server

Nginx is already available in Ubuntu repository, but it’s very outdated (it may be ok for development or testing but not for deployment) so for production environment you should install the newer version – either from the source or PPA.

1. Update

sudo apt-get -y update
sudo apt-get -y upgrade

2. Dependencies

For adding ppa you need to install the python-software-properties package.

sudo apt-get -y install python-software-properties

3. Install nginx

sudo apt-add-repository -y ppa:nginx/stable
sudo apt-get -y update
sudo apt-get -y install nginx

4. Start the server!

sudo service nginx start

Now, move on to the address (IP address of your VPS or the domain name or the localhost(in case of development environment)). You should see the default page served by nginx.

5. setup server configs

For editing file over the ssh, you can use a command line editor such as Vi or Nano. I recommend nano if you want a text editor without any learning curve.

Install Nano, a lightweight text editor

sudo apt-get -y install nano

Then create a server configuration file for your app/site. (you could also just edit the global config(/etc/nginx/nginx.conf), it’s fine if you’ve only one app/site running on a virtual private server but if you plan to deploy multiple apps/websites to a single VPS – then you should create seperate configs for each website)

sudo nano /etc/nginx/sites-available/

After creating the config file (if you don’t know how – then read the official tutorials), create a symlink

sudo ln -nfs /etc/nginx/sites-available/  /etc/nginx/sites-enabled/

Now, restart the server!

sudo service nginx restart

Top 10 Firefox add-ons for web developers

Mozilla Firefox has some cool developer tools (Style Editor, Scratchpad, Debugger, Responsive Design View, Inspect(3D view) and more) by default, but you can further extend them with some of the great add-ons/extensions listed here.

1. Firebug

Firebug has lot of useful features (edit, debug, monitor your code in live mode) that makes web development much easier. It’s a must have add-on for web developers.

Download Firebug

2. Rainbow Color Tools

it provides a bunch of color tools for web development – easy to use color picker, color library, inspector, analyzer(to analyze the color scheme of a website)etc.

Download Rainbow Color Tools

3. Wappalyzer

It tells you about the softwares(libraries, frameworks, server etc) used by a website.

Download Wappalyzer

4. ShowIP

It shows the IP address of the website, in status bar; additionally, you can also query whois, hostname, netcraft etc.

Download ShowIP

5. fontinfo

It’s good for exploring the fonts used on a website (with the font panel or show fonts section in right click menu)

Download fontinfo

6. Web Developer

add some cool web development tools.

Download Web Developer

7. User Agent Switcher

Using this extension, you can easily switch the user agent of the browser.

Download User Agent Switcher

8. Greasmonkey

To customize the web page (how it behaves or displays content), using small bits of javascript.

Download Greasmonkey

9. Modify Headers

To modify the http request headers sent to servers.

Download Modify Headers

10. FireFTP

It’s a cross-platform FTP/SFTP client for Mozilla Firefox.

Download FireFTP

buy and sell bootstrap themes : a marketplace for Twitter Bootstrap Themes!

What is Twitter Bootstrap ?

Twitter Bootstrap is a front end framework (free and open source) for web designers/developers. With bootstrap you can easily create cool looking awesome designs with HTML5, CSS3 and jQuery (cool? yeah!).

If you’re a web designer/developer, then bootstrap may save you a lot of time, instead of working from scratch, you can start working on the top of a solid foundation (960 px grid, styles for buttons, tables, forms etc, jquery plugins, responsive etc comes along with Twitter Bootstrap). – where you can buy or sell “bootstrap themes and templates”


Twitter Bootstrap gives you a solid foundation to begin, by default it looks cool for mockups and prototypes but the default look is not good for final release. That’s where bootstrap themes comes in.


There are already few marketplaces for Twitter Bootstrap Themes ? Why another one ?

The problem with the available marketplaces (like ThemeForest) is that – they cut a large percentage of sale (as the service charge). They pay somewhere between 50-70%. All designers start with 50% (until he cross some cut-offs, e.g after 18.75k, he will get 55%, after $75k, he will receive 70%). I didn’t like that, so I created another marketplace for Twitter Bootstrap Themes. They are over-crowded too,

at,, designers get 70-80% of the sale.

buy and sell bootstrap themes

so whether you’re a designer want to develop themes for bootstrap or a developer looking for bootstrap themes,

visit for Bootstrap goodies!


UPDATE! It’s closed now. But you can checkout my other site about portfolio templates.


Getting Started with HTML5 and CSS3

If you want to develop websites or cool web applications, browser games etc HTML (Hyper Text Markup Language) is the first thing you should learn, it’s the language of web. HTML5 has lot of new exciting features, so you can create awesome websites/apps in a much easier way.


CSS (Cascading Style Sheets) is used for styling the html documents/pages. This way, the design and contents do not mix up. CSS3 is the latest version, with a lot of amazing features that allow you to create cool designs in much effective way.

For Learning HTML5/CSS3, these free tutorials/resources are great for beginners –

  1. Code Academy
  2. Mozilla Developer Network
  3. Web Platform
  4. HTML 5 rocks

But you can’t just learn html/css by reading those manuals, then how ? Create a website (may be for some real purpose or as a fun project), apply those skills (whatever you learned, may be just in a couple of hours). you don’t even need a server or something for learning html/css, design and test in your browser (locally).


want to Learn git ? Start Here!

What is Git ?

git is a distributed version control system, developed by Linux Torvalds during the development/management of Linux Kernel. In other words, it’s a software, a tool, that simply keeps track of the different version of the files, If you mess up, you can easily go back to some previous (correct) version of the file. (to any commits)

The purpose of the version control system is to maintain the consistency between the changes made by different(or may just one) people on a large complex project, it allows them to contribute simultaneously in an easy way. Being distributed means – everyone has the full copy of everything – and everyone can work independently (even without any internet connection, but in case if they want to share the changes with other remote developer, the connection will be required as usual).


Why use a version control system such as git ?

There are many advantages such as –

  • it keeps tracks of different versions of the files in your project
  • it’s very fast
  • it also works as a backup for all your files/changes
  • it’s easy to manage the project if there are more than one people working on it
  • a number of people are already using it, so if you want to collaborate on popular open source project or in an organization then probably you might need it
  • it’s distributed and you got full copy of project files, so you can work offline
  • there are cool project hosting apps such as github that makes git even more fun

How to Learn Git ?

First of all, learn some basics from any sources, and start using it in your project. You can’t just learn git by watching videos or reading manuals – you must use it. It’s a very practical thing, even if you learn all the basics of git – you will eventually forget it unless you apply it somewhere.

Recommended tutorials to begin with git :

Note : All the above tutorials are free but if you don’t mind paying for great tutorials then you must checkout “git real” course on Code School.

update 1: added codeschool link!
update 2: added link to some new tutorials!
update 3: added a link to visual explanation for git