How to open source your apps using GitHub

I am going to list a few steps which would help you create a GitHub repo and perform basic tasks using this :

Git is an open sourced version control system, and “it’s responsible for all the stuff that’ GitHub related and happens locally on your computer”.

  1. Download and install the latest version of Git
  2. Setup git on your machine
  3. Set your username and email as follows, using a terminal:
Set Username (This is the default username used when you commit to git):
$ git config –global user.name “your name”
Set email (This is the default email used when you commit to git):
$git config –global user.email “me@mydomain.com”

Oh yes,  you can skip all of the above steps and get the native GitHub app instead :

 That’s it ! You have set up Git and Github! Next : How to create a repo?
Okay, first:  what is a GitHub repository?
A GitHub repo is like a store where all the data you commit will be stored.

4. In the user at the top right of your GitHub page, click on create a new repo button.

5. Select the account you want to create the repo on.

6. Enter a name for the repository, and click on “Create repository”.

Great! Now you know how to create a new repo. Let’s now learn how to push changes to your repo:

7. CD into your project

8. Type the following command to initialize a git repository on your local machine:

$ git init

9. To see what state your project is in currently, run :
$git status

10. Create a new file in the directory, say test.txt and then run git status command again. You will see that git says “untracked files present”

11.  You need to inform Git to start tracking changes made to test.txt, and  add it to the staging area by using:

$ git add test.txt

12. Now the files are in the staging area, but not yet in the Git repo. To store the changes we have made, we run the commit command with a comment describing what was changed:

$git commit -m “Added a test file”

13. To view a log of all commits:

$ git log

14. Now all the commits made are only to the local repository. How do we push it to the server, so that others can see/download it?

Consider the repository to be repo-test

$ git remote add origin https://github.com/username/repo-test.git

and finally push your changes to the server:

$ git push -u origin master

How about contributing to a new project or using somebody else’s code as a starting point for yours?

This is called forking a project, and can be done as follows: Let’s say you want to contribute to txtWeb-Wikipedia project:

15. Click on fork button, as shown in the screenshot below:

16. Clone your fork to your local machine, so that all the code associated with this project is available on your local machine and you can modify it, using the following command:

$ git clone https://github.com/username/Wikipedia.git

17. Configure remotes:

In order to keep track of the original repo you forked from, you need to add another remote named upstream:

$ cd /path/to/your/wikipedia

$ git remote add upstream  https://github.com/txtWeb/Wikipedia.git

$ git fetch upstream

You could also push commits to any repo using the following command:

$ git push origin master

18. A list of helpful links for learning other GitHub commands:

http://try.github.com

http://help.github.com

 http://learn.github.com

Google’s uncut and annotated Search Quality Review Meeting

This video is the search quality review meeting at Google, yes they publicly released a video of it. This particular “Weekly Review Meeting” was to review spelling correction for long queries. The amount of thought which goes into every single change at Google, the depth of the discussions taking place there and the profiles of the people who were talking just blew me off.

This is a great watch for anyone who has ever wondered how Google Search manages to get it right every single time!

Enabling SSL on Apache webserver

I had to SSL enable my web application for some testing and I spent some of my time googling and figuring out how to do this, but actually turned to be pretty simple. This post is meant to be a one stop solution to this problem :) Here are the few steps you need to follow:

    1. Enable ssl module on apache2

$a2enmod ssl

  1. The apache installation already has a self signed certificate and the necessary configuration settings to make life easier for the developers:cd into /etc/apache2/sites-available
  2. Search for the default-ssl file there.
    Finally run the following command:$a2ensite default-ssl
  3. Restart your apache server and your done!!

Go to https://localhost/, and if you see the browser cribbing about security issues(this is because you are using a self-signed certificate), then you have enabled SSL correctly. Accept the site as a trustworthy source and you must see your home page.

Online Machine Learning Course

I recently completed the Machine Learning class offered online for free by Stanford University. This class taught me a lot of cool things I can do with Machine Learning, like how to build a recommender system or how to know if you are going in the right direction with an ML problem, or not. I totally recommend this course to anyone who is interested in learning Ml. The best part of the class is that you can take it at anytime you want, either download the online lectures and watch them at your own leisure or stream the videos. Of course, if you stream the videos, you have the added advantage of answering the few questions in the middle of the lecture. You would have to complete a bunch of lectures, programming assignments and review questions by the end of the week. The online forum they have set up is also pretty cool, with people discussing interesting stuff or issues with their homework solutions. The submissions of the programming assignments happen via script and you get back the results immediately.

Prof. Andrew Ng takes the class through all sorts of difficult problems with ease and he has a superb knack of getting students to understand tough concepts easily. That coupled with his frequent reminders like “If that doesn’t make sense to you, don’t worry about it.” is a perfect example of how he puts his students at ease, while at the same time conveying all important concepts very clearly.

This course is being offered again in Jan’s and recommend al of those interested to sign up at http://jan2012.ml-class.org/. Believe me it will be one of the most interesting classes you have attended.

Hats off to the ml-class team and I am already planning to attend the algo-class offered in Jan, thanks to the amount I have learned with ml-class!

Here is a brief intro to the class in Prof Andrew’s own words

Hope this encourages you to take the class next Jan..!

Chrome extension for txtWeb

Hi everyone,

I work on txtWeb, an SMS based platform aiming to get the internet on mobile! You can find all sorts of amazing apps, most of them built by students, which let you check cricket scores, tweet, FB, check PNR status, play games all over SMS!

Supporting the true sense of accessibility, I had gone ahead and published a Chrome extension for txtWeb, for those who want  a flavour of txtWeb, even without logging into the txtWeb website ! Enjoy the power of  txtWeb on your Chrome ;) .

Here’s the link to it on the Chrome Webstore: http://goo.gl/ceXXF

Check out some videos about txtWeb here