Note on tracking dotfiles across multiple instances easily with git

Came across’s dotfiles repo, which provided gems of insight into managing dotfiles in Linux (and Windows WSL) environment by using git bare repos. The repo also provided a very good quick start for some common command line configs. When you are working on various compute instances on cloud and/or on local, it is very handy to track and transfer dotfiles easily.

From scratch

Create an empty repo on Github/Bitbucket/Gitlab named dotfiles

git init --bare $HOME/.cfg
alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
config config --local status.showUntrackedFiles no
echo "alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'" >> $HOME/.bashrc

git remote add origin https://repo/path/to/dotfiles.git

Add your dotfiles for example neovim and tmux:

config status
config add ~/.config/nvim/init.vim
config commit -m "add neovim"
config add ~/.tmux.conf
config commit -m "add tmux"
config push

Install on/migrate to new system

echo "alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'" >> ~/.bashrc
source ~/.bashrc
echo ".cfg" >> .gitignore
git clone --bare .cfg/
config checkout
config config --local status.showUntrackedFiles no

Can customize by adding additional stuff like plugin managers Vundle or Plugged

# vim-plug
## neovim 
curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs \

## vim
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \

# Vundle
git clone ~/.vim/bundle/Vundle.vim

Activating the free Let’s Encrypt SSL certificate for your WordPress site

WPBeginner has a easy to follow tutorial on activating the free Let’s Encrypt SSL certificate for your WordPress site, assuming your web host supports them. The really simple ssl plugin mentioned makes the process painless for existing sites.

If you are on HawkHost, you can view their announcements here on their Let’s Encrypt and 2FA support. In short, you can get the free SSL certificate by:

  1. Logging to cPanel, locate the Security section and click on “Lets Encrypt™ SSL” option to start the process.
  2. You can then select the domain that you would like HawkHost to issue the SSL certificate to.
  3. You will be brought to a confirmation page. On confirmation, HawkHost will generate the SSL certificate for you.
  4. Back in your WordPress admin page, activate the really simple ssl plugin and click on the button “Go ahead, activate SSL!”.
  5. You might be logged out of the admin page. If so, login again and you will discover that your WordPress site is now on SSL.
  6. Refer back to the WPBeginner tutorial for additional details like Google Analytics updates.

Find version of python package installed

Below are 3 methods we can try to find the version of an installed python package. We shall use scipy as an example.

Using pip

Method 1 – For pip 1.3 and above: pip show scipy

Method 2 – Alternative (works with older versions of pip): pip freeze | grep scipy

Using version attribute

Method 3 – Launch python/ipython, then execute the commands below:

import scipy

Reference for Method 1 is here. Reference for Method 2 is here.

Definition of Statistical Significance

Note to self: Statistical Significance as defined by Andrew Gelman in his blog post.

Statistical Significance

Definition: A mathematical technique to measure the strength of evidence from a single study. Statistical significance is conventionally declared when the p-value is less than 0.05. The p-value is the probability of seeing a result as strong as observed or greater, under the null hypothesis (which is commonly the hypothesis that there is no effect). Thus, the smaller the p-value, the less consistent are the data with the null hypothesis under this measure.

Getting session information in Python

We’ve gone through how to get session information in R previously, so how do we do the same for Python? It seems that there is no single convenient function available so here’s one approach.

To get the system information, you can utilize the commonly used IPython package:

import IPython

To find out packages that have been loaded at the time (includes modules loaded by Python itself and by any Python IDE), you can utilize the sys.modules.keys() method. The code below gets the package name rather than the sub-components.

import sys
packages = set()
for name in sys.modules.keys():

print sorted(packages)

Getting session information in R

When troubleshooting R bugs or asking for assistance in mailing lists and sites like StackOverflow, it is good to review or present information about your system and packages loaded.

I much prefer the session_info() function from the devtools package over the default sessionInfo() function as it’s output is not only more readable, it also provides useful information like timezone and additional packages (non-base) loaded at the time.

Assuming you have the devtools packages already installed, you can invoke the function in one line:


Bedtime reading – What is Code?

In case you are wondering of what all the buzzwords and jargon like algorithms, coding, off-the-shelf mean, the article What is Code by Paul Ford helps you weave all these buzzwords into a single story.

At 38000 words, it makes good bedtime reading, be it for someone who has no inkling on how computers work or someone who is a seasoned veteran. TL;DR? below is a video summary from Bloomberg via Huffington Post.