Install ansible on Ubuntu

To install ansible on Ubuntu, run

How to protect .git folder using htaccess

GIT is popular version control software, this work like a time machine. You can easily get older versions of code. Each changes are stored as commit, so it work like a time machine for source code.

If you put your .git folder in a publically accessable folder, others will be able to access your source code. It is better put this folder outside of DocumentRoot folder.

If your .git folder is on public folder, then use following .htaccess code to block access to it.

Method 2

Create an .htaccess file inside .git folder with content

List kernel modules

To list kernal modules, use



Install mitmproxy on Ubuntu

mitmproxy is a man in the middle proxy server for debugging.


To install mitmproxy on Ubuntu, run

On Ubuntu 18.04, this is broken. To insall i created a virtualenv

Install mitmproxy inside virtualenv with

To start, run

This will listen proxy on port 8080, you can verify with command

If you get error like


To configure in browser, you can use it as HTTP proxy. Here is how i configure it on Firefox FoxyProxy.

Logging Linux Commands for all users

To log commands executed by users on Linux shell, edit file


Create file


Restart rsyslog

Now log off and login, you will be able to see all commends executed by users on bash shell in file /var/log/commands.log

Log rotating



Add below