I see, learn and rediscover… everyday!
 
Month: <span>January 2011</span>

Remove all your friends from Facebook.

Very rarely, you will want to delete all friends from Facebook and start a “fresh” facebook account. Now, it’s hard to do this manually. Thanks to phpunit + selenium + a few lines of code, this can be done now. The following script removes all your friends from facebook 🙂 Replace and with your username and password respectively. <?php require_once ‘PHPUnit/Extensions/SeleniumTestCase.php’; …

Vim tutorials

VIM is an awesome editor, but comes with a big big learning curve. These are the the top 3 Vim tutorials from where I learnt to use Vim. 1. http://www.vi-improved.org/tutorial.php 2. http://vim.runpaint.org/toc/ 3. http://www.swaroopch.com/notes/Vim_en:Table_of_Contents If you want to learn more, checkout http://thomer.com/vi/vi.html#manuals

Git reflog and git force push

Git reflog saves you from all screw-ups you do while using git. Here is a sample output of git reflog. hari@hari-desktop:/var/www/recruit$ git reflog e458f54 HEAD@{0}: checkout: moving from test1 to e458f54fe99202c82c2690be4fa2fe2d7aa7be32^0 a3281d1 HEAD@{1}: checkout: moving from master to test1 f265802 HEAD@{2}: checkout: moving from test1 to master ef08492 HEAD@{3}: ORIG_HEAD: updating HEAD e458f54 HEAD@{4}: commit: Implement phpunit testcase. 1ecf2c3 HEAD@{5}: …

Compare branches in git

Want to check if all changes in your new branch is merged to main branch before you delete the new branch. git log feature1 ^master The above command displays all commits which are present in feature1 and not present in master. Note 1: You can also try “git branch -d feature1”. If the new branch is not totally merged, git …