add .gitignore template

intialize a .gitignore file. common stuffs like *.o, *.pyc and
*.~ are ignored. Everyone should go add in any files they want
to ignore.