Category: <span>code</span>

Suicide

This post is the result of writing a LOT of Google apps scripts and watching a lot of ‘Forensic Files‘ in Netflix. An interesting function I used so far to attach a menu is the onOpen() function. The code inside the onOpen() function executes when the file is opened. For …

Mail Merge to PDF Files

Mail merge is a great feature (truth be told, everything that automates a repetitive job is a great feature). One of the tedious repetitive task our team keeps doing often is generating PDF files for our employees (usually one file per person). We are going to automate this using Google …

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: …

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 …