Fix - DBeaver SSH tunnel connections fail with invalid privatekey error

I tried to connect to a remote Postgresql server with DBeaver and got this error today. The error message said my private key was invalid. To check this further, I tried to login to the server using the terminal as usual and it worked. So I realized the issue must be in...

Install Python packages to the current directory using PIP in Ubuntu 18

I wanted to test something today and had to write a simple python script which required a few python modules. So I installed them using pip, but there was a little problem. I don't like it when package managers install packages globally or system wide. I wanted them to be installed...

VIM - get back to edit mode after Ctrl + S freezes the screen.

I'm used to press ctrl + s all the time that even when I'm using VIM to edit some codes, I press it and you know, it freezes everything and you can't do a thing afterwards. It has always been a problem and the first time I actually had to google how to get back to vim, today...

Copy files to a stopped Docker container (and vice versa)

Recently I had to copy a file to docker container to make some immediate changes on it. The container crashed and kept restarting every time we try to bring it up, so I was not able to access the container's file system. So while looking for a solution, I learned that it's...

Updating Whiptail gauge (Progress bar) with Python

I spent last week writing a Python script to create an installer for some services, and I wanted to show the installation progress using a gauge. So I used the whiptail utility which comes with most linux distros as it was easier to use for this particular task. However, there...

Bash - Switch STDERR to STDOUT

Today I wrote a bash script to create a very simple porcelain client on Git to add and commit files without entering all the git add, commit commands. I personally don't like to use Git clients with GUIs because they are somewhat complex, and I really love working on the terminal...

Ubuntu touch: Change the created or modified date of a file using terminal.

Last week I wrote an automation script, which (a part of it) generated some files, and I wanted to store them for a maximum of three days. So along with the script, I wrote another bash script to delete any files which are older than three days, and I set it to run as a cron...

View and edit files inside a docker container.

Today I deployed a new service in a docker container and found that service wasn't working as expected. Since it was working in my local environment, I guessed that it could be due to a small issue. So I decided to access the files inside the docker container and do some manual...