When browser connects to a website, it includes a User-Agent string in its HTTP header. Sometimes you may need to change User-Agent with curl to access some URL as a different browser. This is a small note on how to set a custom User-Agent with curl from the command line in Linux.
Redis is a key-value database (also known as a key-value store) that uses a simple key/value method to store data. Strings are the simplest data type in Redis and are simple key/value entries. To save or fetch string data there are Redis SET and GET commands. Redis SET command creates a key and assigns it […]
In Redis you can flush cache/database and delete all keys from all databases or from the particular database only using FLUSHALL and FLUSHDB commands. To delete all keys from all Redis databases, use the FLUSHALL command. To delete all keys of the selected Redis database only, use the FLUSHDB commnad.
There are two ways to get all keys from the all databases in Redis. The first way is to list keys using –scan option and the second one is to get all keys using the KEYS command. Note that the first way of getting all keys is preferable as it doesn’t require the client to […]
From time to time, when your operating system (Ubuntu, Linux Mint or similar) tries to install new kernel data you may get the following error message: The volume “boot” has only 0 bytes disk space remaining. This error means that the /boot partition is full (in most cases there are some old kernels). To fix […]
What is a self-signed SSL certificate? A self-signed certificate is a certificate that is not signed by a trusted authority. Nevertheless, the self-signed certificate provides the same level of encryption as a $100500 certificate signed by a trusted authority. In this article i will show how to create a self-signed certificate that can be used […]
If you want to update Nginx configuration or renew SSL certificates, you should reload Nginx to apply modifications. If you run Nginx inside Docker container you might be curious how to reload it without any downtime or connection interruptions. The best way to reload Nginx inside Docker container is to run docker container exec command […]
Most Linux distributions use systemd as a system and service manager. The systemctl is the main command in systemd, used to control services. In this tutorial i will show how to create a systemd service file that will allow you to control your service using the systemctl command, how to restart systemd without reboot to […]
virtualenv serves for creating isolated Python environments. It creates a folder with a copy of Python interpreter and a copy of the pip library which will be used to install other packages in this virtual environment without affecting other projects or system-wide libraries. virtualenv makes it easier to work on more than one project at […]
For ones, who want to build and run Docker containers on CentOS-7 – first of all it is required to install Docker itself. To install the latest version of Docker and to be able to upgrade it easily in future – it is recommended to install Docker from the official repository. In this guide i […]