

List active connection details in MariaDB
To list active connections and their details in MariaDB we can use the following queries. Using threads_connected Using processlist Using […]

Safe casting in Kotlin
In multiple cases you might’ve came across the situation where you have to cast a global variable and check the […]

Install Cloud SQL Proxy and connect to MySQL db in Ubuntu
In this post let’s see how to install cloud sql proxy and connect to a mysql database setup in Google […]

Get all deployments under a namespace with kubectl
To get all deployments under a namespace with kubectl, just run the following command. Example

Get container name using pod name with kubectl
To get container name using pod name with kubectl, just run the following command. Example

How to copy files into pods using kubectl?
To copy files into a pod we can use kubectl cp command. Syntax This is very similar to docker cp […]

Unable to connect to the server: x509: certificate signed by unknown authority – kubectl error when connecting to gcloud pods. How to fix?
When you are using your kubectl for the first time you would face this error – Unable to connect to […]

How to Install Kubectl in Ubuntu?
We are going to use the debian package managers to install Kubectl in Ubuntu. Output Output Output Output Output

Get OS version (32 bit or 64 bit) in Linux
To get OS version i.e 32 bit or 64 bit, just run the following command in terminal. This will return […]

How to pass arguments into a Spring boot run?
To pass arguments when you are running a Spring Boot application you can simply assign your parameters to -Dspring-boot.run.arguments To […]

Error: Could not find or load main class org.apache.maven.wrapper.MavenWrapperMain
Caused by: java.lang.ClassNotFoundException: org.apache.maven.wrapper.MavenWrapperMain – How to fix?
When you are using maven as a build tool in your Spring Boot project you will get this error if […]

Dynamic key in MongoDB Node.js Native API
Learn how a key can be dynamic in a MongoDB Node.js native API. In the above code snippet, user_tree is […]

Update all packages in Ubuntu
Updating packages in Ubuntu is sometimes needed to upgrade your Ubuntu to latest version and apply security updates. We can […]

Adding custom Chai assertions to your Cypress tests
Cypress allows you to add custom assertions as Chai plugins and use them in global scope. I found a good […]

Compare JSON objects ignoring the order of the properties in JavaScript
To compare two JSON objects we cannot use equality operators === (in case of JavaScript), == (in case of Java). […]

How to make an Axios DELETE request?
Making a DELETE request in Axios is very similar to making a POST or GET request. Let’s assume we are […]

Remove unused npm modules from package.json
Depcheck is a tool for analyzing the dependencies in a project to see: how each dependency is used, which dependencies […]

What are the possible ways to create objects in JavaScript?
There are many ways to create objects in JavaScript as described below. Object constructor The simplest way to create an […]

Vertical text with horizontal letters in CSS
To display vertical text with horizontal letters we can use two properties – text-orientation: upright and writing-mode: vertical-rl The output […]

Unescaped at-sign in authority section – MongoDB connection string error. How to fix?
When your mongodb username or password contains ‘@’ you would get the error Unescaped at-sign in authority section. To fix […]

Inserting and removing elements at a particular position from a JavaScript array
Let’s define an array in JavaScript. Let’s say I would like to insert an element at the fourth position in […]

Save server certificate to your local machine using bash
To save a server certificate to your local machine, we can use openssl and read from the https port 443 […]

Challenge failed for domain – Certbot error – How to fix?
I was setting up letsencrypt certificates to enable SSL on one of my ubuntu servers. I mapped a domain (zumpdo.xyz) […]

Match a value with multiple fields using OR in MongoDB
I have a scenario where I need to allow users to log into an application using either username or email […]

Attempted import error: ‘Link’ is not exported from ‘react-router’. – React error. How to fix?
To fix this error, change your import statement from import { Link } from ‘react-router’ to:

How to get a key in a JavaScript object by its value?
Let’s take a JavaScript object. To find the key of value ‘B’,

How to rename an existing git remote ?
To list down your remote repository handles that is currently being used in local repository, we use git remote -v […]

How to remove a git remote ?
To list down your remote repository handles that is currently being used in local repository, we use git remote -v […]

Disallow empty values for a column in MySQL
To avoid a NULL value in a table column in MySQL we specify NOT NULL constraint when you create a […]

bad SQL grammar [SELECT JOB_INSTANCE_ID, JOB_NAME from BATCH_JOB_INSTANCE where JOB_NAME = ? and JOB_KEY = ?] Spring Boot / Spring Batch error. How to fix?
Reason for this error : Spring Boot / Spring Batch needs default tables where it can track the batch job […]

java.lang.IllegalStateException: Could not load JDBC driver class [com.mysql.jdbc.Driver] – Spring Boot / Spring Batch error. How to fix?
The reason for this error is you have missed MySQL dependency in your maven / gradle file. Add this in […]

List processes using internet in Ubuntu
To list the processes that are using your internet connection in Ubuntu (or Linux, in general), we can use the […]

Limit docker container memory usage
We should limit the memory usage to the containers like limiting the CPU usage. Providing unlimited memory usage to the […]

Limit docker container CPU usage
Providing unlimited host CPU usage to the docker containers may lead to performance issues. By default, each container’s access to […]

Color your text in console using JavaScript
To colorize your console text we add a few special characters to your text that correspond to a color code. For […]

Rename a collection in MongoDB
Renaming a collection in MongoDB is quite simple. When you rename a collection, it obtains a lock on the collection […]

How to check if a list is empty in Python?
In this tutorial we discuss the various ways of checking if a list is empty in Python. len bool equal

How to attach to an existing tmux session?
To get the list of existing tmux session use tmux ls command. Here there is one session that already exists. […]

Find out which remote branch a local branch is tracking
To list down all branches that are currently being tracked, we can use the following command. An example: To show […]

Join an existing network from a docker container in docker compose
In some scenarios, we might need to connect to an existing network from a docker container instead of create a […]

How to live tail Docker logs?
To view docker logs we use the docker logs command. We would usually want to view live logs from a […]

List all networks in a docker setup
To list down all networks that a docker daemon know about, we can used docker network ls command. We can […]

Slice only one element from an array in MongoDB
Let’s say we have two documents in a MongoDB collection called scores and I would like to fetch the latest […]

Install Terraform in Ubuntu/Debian
In this post let’s discuss how to install Terraform in Ubuntu / Debian operating systems. HashiCorp is the company who […]

Install KVM on Ubuntu 20.04
In this quick post we will focus on install KVM on Ubuntu 20.04. Kernel-based Virtual Machine (KVM) is an open […]

How to get client’s IP address using JavaScript?
There’s no built-in solution in JavaScript to get IP Address of the client’s server but there are other cool ways. […]

Defining variables inside the If statement in JavaScript
If statement is used validate an expression to boolean value, like checking a primitive/constant value against a JavaScript variable, but sometimes […]

Get total number of links from a HTML document using JavaScript
All links in a HTML document is stored in document.links as a HTMLCollection. You can get the total number of […]

How to represent negative infinity in JavaScript?
Negative infinity in JavaScript is a constant value which is used to represent that no other number is lesser than […]

Pad a number with leading zeros in JavaScript
To pad a number with leading zeros, we can use the padStart() method. The padStart() method pads the current string with another […]

Get all method names of an Object in JavaScript
The Object.getOwnPropertyNames() method returns a string array of all properties implemented directly upon a given object. We can use this method to […]

How to check if a field exists in a MongoDB document?
In this quick post, learn how to find out if a field has a value, any value in a document […]

MongoError: the update operation document must contain atomic operators – How to fix?
How to fix this error when you are working with MongoDB documents. – MongoError: the update operation document must contain […]

How to remove property from an array of objects in JavaScript?
In this short post, we are going to discuss how to remove property from an array of objects in JavaScript. […]

Dynamically generate tests in Cypress to test your APIs
When you are using Cypress to test your APIs, you might face a scenario where you have a config or […]
Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client – How to fix?
Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client – This error actually means you have already […]
Curly hair, very fair, please share :)
Unescaped at-sign in authority section – MongoDB connection string error. How to fix?
When your mongodb username or password contains ‘@’ you would get the error Unescaped at-sign in authority section. To fix […]
Inserting and removing elements at a particular position from a JavaScript array
Let’s define an array in JavaScript. Let’s say I would like to insert an element at the fourth position in […]
Save server certificate to your local machine using bash
To save a server certificate to your local machine, we can use openssl and read from the https port 443 […]
Challenge failed for domain – Certbot error – How to fix?
I was setting up letsencrypt certificates to enable SSL on one of my ubuntu servers. I mapped a domain (zumpdo.xyz) […]
Match a value with multiple fields using OR in MongoDB
I have a scenario where I need to allow users to log into an application using either username or email […]
Attempted import error: ‘Link’ is not exported from ‘react-router’. – React error. How to fix?
To fix this error, change your import statement from import { Link } from ‘react-router’ to:
How to get a key in a JavaScript object by its value?
Let’s take a JavaScript object. To find the key of value ‘B’,
How to rename an existing git remote ?
To list down your remote repository handles that is currently being used in local repository, we use git remote -v […]