My current project makes use of the MySQL database, which runs in a Docker container.
At a certain moment connecting to the database became excruciatingly slow, taking tens of seconds to establish a single connection. After that everything would work as expected.
The application opens a connection some hundred times, so the startup time had become really unacceptable.
I’ve spent a lot of time hunting that down, and then even more time looking for a solution as I failed to find any on StackOverflow. But finally I’ve solved this.
My today’s story is about a well-known yet impressive graphic editing technique called multiplicity. It allows you to multiply objects on a photo—most commonly people, but it can be just as well kittens or lawn-mowers. Using this technique, you can make pictures like this:
I’m a Linux guy and hence my favourite graphic editing tool is Gimp, but the same can be done with any other editor that supports layers and masks.
I couldn’t take it anymore so I created an audio input/output switcher indicator for Ubuntu.
I already published a script that sets a random image file as desktop wallpaper. It has only one downside: you have to run it every time you want to rotate your wallpaper.
However GNOME since 2.28 allows assigning a slide show as wallpaper by providing an image list in XML format. There you can specify the order and duration for each image. Moreover, you can even define a transition from one image to another.
So I decided to create a simple script that generates an XML file for a given set of images and, optionally, sets that as the current wallpaper. It requires GNOME 3+ or Ubuntu (11.10 or later).
Uploading 130 GB of music to the cloud has completed in about four days, so now I can enjoy the whole collection online from anywhere—although with some shortcomings (which are perhaps to be eliminated once the service goes out of the beta).
This bash script picks up a random image file (.jpg, .jpeg or .png) from the predefined directory and sets it as wallpaper.
The previous version of the script worked fine with GNOME 2 and Ubuntu 11.04 (and earlier), but after
GConf backend was changed to
dconf in GNOME 3, it stopped working.