Change windows10 Alt+Tab navigation back to classic icons instead of thumbnails

In the registry editor, reach HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer.

Add a new DWORD key: AltTabSettings and change its value to 1.

Restart Explorer (Launch the Task Manager, find ‘Windows Explorer’ in the group ‘Windows processes’, right-click it and ‘restart’)

Now Alt+Tab should display only the application icons.

To revert back to the thumbnails, change the registry-key (AltTabSettings) value to 0.

Removing a directory from the git repository after adding it to .gitignore

If a directory was added to .gitignore before pushing to the repository, it does not get pushed. But if the directory was already pushed, and later added to .gitignore, then to remove it from the repository:

git rm -r --cached dirToIgnore
git commit -m 'Removing the gitignored dir'
git push

The directory dirToIgnore should now be removed from the git repository.

Fixing Apache localhost/~username resolve on macOS Mojave

Edit /etc/apache2/httpd.conf

sudo vi /etc/apache2/httpd.conf

Uncomment the following lines:

#LoadModule vhost_alias_module libexec/apache2/
#Include /private/etc/apache2/extra/httpd-vhosts.conf
#LoadModule userdir_module libexec/apache2/
#Include /private/etc/apache2/extra/httpd-userdir.conf

Uncomment the following in /private/etc/apache2/extra/httpd-userdir.conf :

#Include /private/etc/apache2/users/*.conf

Create the file /private/etc/apache2/users/yourUserName.conf if it doesn’t exist:

sudo vi /private/etc/apache2/users/yourUserName.conf

Add the following in this file:

<Directory "/Users/yourUserName/Sites/">
  Options Indexes MultiViews
  AllowOverride None
  Require all granted

For running PHP, uncomment the following line in /etc/apache2/httpd.conf . The version of PHP in the module name may vary as per the currently installed version (7 in this case):

#LoadModule php7_module libexec/apache2/

Restart Apache server:

sudo apachectl restart

The local webserver should now be available at http://localhost/~yourUserName/ , referring to the location ~/yourUserName/Sites/

using git to deploy on server

Install git on the remote server (if it is not already).

On Ubuntu:

sudo apt-get update
sudo apt-get install git

Create an SSH key pair (locally):

ssh-keygen -C ""

Accept the default file to save the key. If a passphrase is entered, it would have to be entered every time during ‘git push‘. The following two files would be created in ~/.ssh/ (public key)
id_rsa (identification)

Create an authorized_keys file (if it is not present) on the remote server in ~/.ssh/ for the SSH daemon to accept the key:

touch ~/.ssh/authorized_keys

Copy the local SSH ID/key to the remote server’s authorized_keys in ~/.ssh/ as:

ssh-copy-id user@remoteServerIP

It would prompt for the passphrase if it was entered while generating the key (using ssh-keygen).

Create a local git repository, in a project directory (say ~/project01) that needs to be uploaded to the server. Then create a file in it to test the git transfer later:

cd ~/project01
git init
echo 'testing deployment via git' > example.txt 

On the remote server, initialise a bare repository in a directory (say ~/project01.git):

mkdir ~/project01.git && cd ~/project01.git
git init --bare

Set up a post-receive hook for ~/project01.git on the remote server, to ‘checkout’ the git files into a remote project directory (say ~/project01, as the local):

mkdir ~/project01
nano ~/project01.git/hooks/post-receive

Enter the following script code in this post-receive file:

export GIT_WORK_TREE=/home/user/project01
git checkout -f master

Make post-receive executable:

chmod +x ~/project01.git/hooks/post-receive

Set up remote origin to the server (bare) repository, at the local end:

git remote add origin user@remoteServerIP:project01.git

Stage the content of the local repository and commit it:

cd ~/project01
git add example.txt
git commit -m "New sample file to test git transfer"

Push the sample file to the server, setting the remote as upstream:

git push --set-upstream origin master

The file should be available on the remote server at ~/project01 (created earlier).

Note: It is recommended against using git as a deployment tool, for reasons as it does not track permissions. Read here.


komorebi – sunlight filtering through the trees


木 – tree

漏れ – leakage

日 – sun


A text-based window manager for linux and terminal multiplexer; displays system info in the CLI, such as battery, hdd, thermal stats.

battery status on linux via CLI

acpi (battery stats – basic)

acpi -i (battery stats – more info)

acpi -V (battery & thermal stats)

sudo tlp-stat -b (battery info)

sudo tlp-stat -s (system info)

booting ubuntu in text mode

back-up grub:

sudo cp /etc/default/grub /etc/default/grub-orig

edit the following in /etc/default/grub:




update grub:

sudo update-grub

Set systemd target. The unit groups many daemons and starts services such as NetworkManager.service and activates another target unit named

sudo systemctl set-default

check default target:

systemctl get-default

The above command links to: /etc/systemd/system/

List all target units:

systemctl list-units --type target --all

To reset to graphical target:

sudo systemctl set-default 

hostname dns resolve

This is a collection of some commands to diagnose the DNS resolution problems, from OSX in a local network having linux and mac machines.

On linux, edit: /etc/avahi/avahi-daemon.conf to set ‘use-ipv6’ to ‘no’, so avahi resolves the hostname to ipv4 address. Not sure if this affects the DNS resolution from a mac, but I set it to ipv4 anyway.


Restart avahi-daemon on linux:

sudo systemctl restart avahi-daemon.service

Resolve mDNS/DNS hostname to IP address and vice-versa:

avahi-resolve-host-name onizu-asus.local

Scan for mDNS/DNS-SD services published on the local network:


on OSX, run the DNS Service Discovery tool:

dns-sd -E

The domain should be listed in the output of the above command. But for me it doesn’t list anything..

A system reboot works for me. The local hostname starts resolving on the mac. Not able to figure out why it stops working after a while..

ISP blocked inbound port 80 – workaround using dynamic DNS service feature

Tried setting up dynamic DNS for a local server using no-ip , but the bloody ISP has blocked the inbound port 80 🙁

The no-ip service does have a feature to redirect port 80 though to the desired port on which the web-server is running locally.

(While trying out different options, I also discovered that the ISP had blocked 443 too.)