Category Archives: Software

How to check in Bash script if a Docker volume does not exist

Sometimes you may want to check if a Docker volume exists or not in a Bash script: To check existence of a Docker volume we can use the docker volume ls command with the name option but there are several … Continue reading

Posted in Software | Tagged , | 1 Comment

Access Denied for User ‘root’@’localhost’ (using password: YES)

In this post I describe a lesser known reason you may run into Access Denied for User ‘root’@’localhost’ (using password: YES) error when trying to login to MySQL. The setup is as follows: you are running MySQL inside a Docker … Continue reading

Posted in Software | Tagged , | Leave a comment

Bash script to upgrade a Docker container

Problem: We have an application that has a single instance and runs in a Docker container and further uses a swarm network. We want to write a bash script using which we can deploy new version of the application. The … Continue reading

Posted in Software | Tagged , | Leave a comment

Extract comments in PDF file

Here are step by step instructions on how to extract comments in a PDF file. The steps to do it using Adobe PRO are documented here. This posts describes how to do it if you do not have Adobe PRO. … Continue reading

Posted in Software | Tagged , , | Leave a comment

Debugging cron jobs

Open /etc/rsyslog.conf (RHEL 7.x) and check for following line: The path in previous step gives the filename to which cronjob runs will be logged. Open that file. Whenever a cronjob is executed, an entry is logged into this file. Example … Continue reading

Posted in Software | Tagged , | Leave a comment

invalid literal for int() with base 10

UPDATE: It turns out none of this works. I ran into the same error with latest VS Code and ms-python extension. The fix was to stick a breakpoint before the input command to prevent VS Code from taking conda activate … Continue reading

Posted in Software | Tagged , , | Leave a comment

Databases 101

Structured Data Unstructured Data Semi-structured data – the best way to think of structured data is data that can be queried through SQL – Structured Query Language– this means data has a schema and is made up of typed primitives … Continue reading

Posted in Software | Leave a comment

Understanding dates and time in MySQL

TL;DR: Set your server timezone and connection time zone to both ‘+00:00’ and use datetime instead of timestamp when you want to store dates outside the range supported by timestamp (‘1970-01-01 00:00:01.000000’ to ‘2038-01-19 03:14:07.999999′). Do’s when using datetime: Add a suffix … Continue reading

Posted in Software | Tagged | Leave a comment

MySQL Foreign Keys

I used to think that the foreign key column has to be unique [ref] but that is not the case. Consider the tables below where we have a parent -> child -> grandchild relationship. A competition has teams and a … Continue reading

Posted in Software | Tagged | Leave a comment

Dealing with annoying Azure Devops Permissions

Like many other of its products Azure Devops is over-engineered and a pain to use. Unfortunately you might have to use it in your organization. One of the biggest problems I have run into with it is when it will … Continue reading

Posted in Software | Leave a comment