Postgresql cannot start and no errors in logs - Fix

I have been doing a lot of work with Postgresql recently including replication, clustering, automatic failovers and so on. During one of my tests, I came through this situation where I tried to restart Postgresql server and it shows the server is started, but if I check the...

systemctl disable alternative command for Ubuntu 14.04

If you are using Ubuntu 15 or any higher version, you can use the systemctl command to enable or disable services. But before Ubuntu 15, it is not available. So here is an alternate way to do the same in earlier versions like Ubuntu 14.04. I recently wanted the same and...

Fix - Ubuntu hangs at the end of file copying

I had this problem with Ubuntu for a long time and I've been looking for a solution that works. After trying out many different things, I finally found something that really worked and I thought I should share it in my blog for my future reference as well as a help for those...

Easy setup Streaming Replication for Postgres 9.6 in Ubuntu

Recently I installed Postgresql 9.6 on two Ubuntu servers and configured streaming replication between them. Although there are many articles and guides covering this topic, I noticed that most of them are missing some important steps or they contained wrong information. After...

FATAL: the database system is starting up - Postgres Streaming Replication

I was setting up streaming replication between two Postgresql servers in active passive mode. After the setup was done, I tried to connect to the slave node to see if everything works fine and received the following error: FATAL:  the database system is starting up I...

Fix gpg: no valid OpenPGP data found error in Ubuntu

Today I was installing Postgres 9.6 in Ubuntu 14 server and while adding the key, I got this error. gpg: no valid OpenPGP data found error This is the command I entered: wget -q -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - I tried several...

Fix tmux: error while loading shared libraries: libevent-2.0.so - upgrade to Ubuntu 18.04

I have been using Tmux for some time with Ubuntu 16.04 and it was all working so well until I upgraded my system to Ubuntu 18.04. When I tried to run tmux via the command, it interrupted with an error as shown below: tmux: error while loading shared libraries: libevent-2.0.so So...

Set tab width in VIM to 4 spaces or a single tab

  Vim by default adds two tabs when you indent something. It also messes up the whole thing if you paste a large code block with tabs into it. Here's how you can set the tabs to 4 space width, and fix that messing up issue. Edit your vim config file and add this at the...

Convert putty ppk key file to public, private key pair to use in SSH client Ubuntu

Today, a friend asked me to login to a Linux server and he sent me a PPK file which he uses with his Putty client in Windows. I had to generate a Public / Private key pair from that PPK file in order to use it with my SSH client in Ubuntu. It was really easy...

GMAIL Mailbox names for IMAP connections?

I worked on something interesting today. That was "creating a simple email client for Gmail", using the PHP's built-in IMAP library. I know there is an official PHP library provided by Google for that, and I have even wrote a blog post about it sometime back (explaining about...

Change prompt in Ubuntu terminal - Hide hostname and working directory.

Oftentimes, I use Tmux to split my terminal windows to save time from switching between them. Although that was quite nice and useful, I always had one problem when working inside some directories located deep down my directory hierarchy. That is, whenever I split up my terminal,...

Maria DB Fix - ERROR 1698 (28000): Access denied for user 'root'@'localhost' on a new installation.

Today I installed MariaDB on my laptop and faced this weird issue. After the installation, I tried to login to the DB shell using the user 'root' and the blank password. Then it returned me this error message stating: ERROR 1698 (28000): Access denied for user 'root'@'localhost' My...

Hide recent files in Ubuntu Dash search.

By default Ubuntu shows file results and recently accessed files in the dash. Although it's useful, there are times it becomes annoying to the point that you wish if you have an option to disable / hide these files from the dash. Luckily, it's something very easy to achieve. Here's...

Customize Gmail's new Material UI to look better!

Good news folks, Gmail launched it's new user interface with a cool material design a few days ago and I promptly switched to it. Like every other web developer who questioned "why Google doesn't introduce the material design UI to Gmail?", I too was concerned on the same, and...

Download a list of files using a shell (bash) script.

Today I'm going to share something interesting which will help you to download a large number of files at once. For one of my projects, I had to find images from Google, and upload them one by one to a particular website and create posts. At first, this was not much difficult...

Solved - How to exit a telnet session?

How to exit a telnet session? It's funny, but I was fumbling with the terminal to exit a telnet session today. I rarely have to use telnet so I'm not much experienced with it. But if someone ever want to exit from a telnet session this is what you have to do. Basically when...

Fix libQt5Charts.so.5: cannot open shared object file error with Redis Desktop Manager in Ubuntu

A few days ago, I was looking for a Redis client for Ubuntu and found that there is one called Redis Desktop Manager. Although it's free and open source, it only provides builds for Windows. Ubuntu and Mac OS users have to subscribe by making a monthly payment or they can build...

Fix - PyCharm pydev debugger not working.

I was using PyCharm today and I suddenly got this weird error when I started the debugger. The debugger was working fine earlier so I was a bit clueluess as to why it happened. The error I recieved was something similar to what I have shown below. Connected to pydev debugger...