Categories
DevOps

How to upgrade lxd guests

It is time to mention about simple sequential or simultaneous upgrade process on lxd guests. It is adapted to Debian-like operating systems using apt as I am using these daily.

Categories
DevOps

How to post message from command-line into Slack

Use a defined webhook to post a message from the command-line as a parameter, standard input, or a file into Slack/Mattermost. Take advantage of colors, icons, and markdown to enhance your message.

Categories
DevOps

How to setup apt-cacher-ng Vagrant box

Vagrant is an awesome piece of software, but constantly downloading system packages can be very time-consuming. The simplest solution is to set up an apt caching proxy as a Vagrant box.

Categories
DevOps

How to setup DokuWiki Vagrant box

Today, I will publish Vagrant configuration to set up DokuWiki instance. It is just a handy reference, as described in the earlier blog post.

Categories
DevOps WebOps

How to extract the cover image from an e-book

I have successfully used Google Drive and Insync to organize all of the e-books that I have acquired during the last years. Currently plan to upload them to a personal DokuWiki instance since I use it more every day. Before I can start, I need to extract cover images to ensure that I will get a decent outcome.

Categories
DevOps

How to remotely check PostgreSQL version

Today I will shortly describe how you can remotely check the PostgreSQL version and use it inside shell scripts. This ability comes in handy at times, as it can be used to perform different tasks depending on the returned database version.

Categories
DevOps

How to non interactively provide password for the PostgreSQL interactive terminal

There are two ways to non interactively provide a password for the psql command (PostgreSQL interactive terminal). Each method allows you to quickly write shell scripts using terminal-based PostgreSQL utilities as you can provide user credentials from the password file or environment variables.

Categories
DevOps

How to control VirtualBox machine using shell

At the beginning of the last year, I wrote about VirtualBox image conversion. Today, I will continue this topic further and describe how to control the virtual machine using the command line.

Categories
DevOps

How to automate mouse and keyboard

Recently I was wondering if it would be possible to automate mouse and keyboard actions. The answer is obviously yes as you can use xautomation and xdotool tools. I will describe them in a couple of simple examples.

Categories
DevOps

How to remove comments from a shell script

The easiest way to remove comments from a shell script is to use sed (stream editor for filtering and transforming text) command.