Category Archives: Uncategorised

Generate self-signed certificate with openssl

To generate self-signed certificate for a quick test or for development. If you are looking for getting certificate for production site then I strongly suggest to go for a proper certificate like LetsEncrypt. You can get it easily with certbot. To generate a self-signed SSL certificate using the OpenSSL, complete the following steps: Write down… Read More »

Extract data from postgres in docker and save it to csv

The case is simple postgres database is hosted in a docker image and to access the database use this command. docker image name can be found with this command docker ps -a. docker exec -it <docker-image> psql -U postgres docker exec -it <docker-image> psql -U postgres -a <dbname> -c “copy(select u.name user_name,p.name place_name, attempts,p.created fromplace… Read More »

Convert audio in bulk with GNU parallel

The below command will convert flac files in a folder to mp3. You can add multiple output formats in the end. Source link: https://unix.stackexchange.com/questions/487024/batch-convert-decode-audio-into-multiple-formats-with-ffmpeg

Moodle migration

Moodle migration from one server to another while upgrading to a new moodle version Enable maintenance mode before doing anything. This will make sure that there is no data lose and also inform users that the site will not be available. Plan the migration steps before starting the migration which will speed up the process… Read More »

Reset password in matrix synapse

To reset the password of matrix user in debian After login as root. Change the user to postgres At the postgres prompt connect to synapse database and update users table with new hash. generate the hash with hash_password command

monitor network speed shell script

No need to install any tool to monitor the network speed. Just run this script and it will show the correct speed. Feel free to modify the code. #!/bin/sh usage(){ echo “Usage: $0 [-i INTERFACE] [-s INTERVAL] [-c COUNT]” echo echo “-i INTERFACE” echo ” The interface to monitor, default is eth0.” echo “-s INTERVAL”… Read More »