Don’t Rely on Ubuntu 14.04 Service Autocomplition

Don’t Rely on Ubuntu 14.04 Service Autocomplition

It appears lot of my colleagues think they’ll get the name of any service in Ubuntu system autocompleted by typing service first_few_letters_of_service_name and pressing Tab button. When this does not work (and it does not work a lot) it creates a lot of confusion and rises lot of questions.

In Ubuntu 14.04, the script that handles completions for service command is /usr/share/bash-completion/bash_completion It looks for service names as files in /etc/rc.d/init.d, /etc/init.d, and in the output of systemctl list-units --full --all

Debian 8 Xfce4 Xscreensaver Lock Problem

Debian 8 Xfce4 Xscreensaver Lock Problem

Long blah-blah-blah, you may skip to the problem description

Long story short - after a system upgrade on my old EEEPC1005PE netbook awesome tile manager stopped to work with my config. I’m using some shifty library features and it looks like library from Debian package awesome-extra version 2012061101 does not keep up with awesome 3.5.6-1.

I don’t think it’s something unrecoverable but decided to try some new (for me) window manager. Since the netbook is not very powerful quite obviously I didn’t even consider fancy ones. My two options are xfce4 and xmonad.

Python. Threading. Function() Takes Exactly X Arguments (Y Given)

Was playing around running multiple threads in Python. Here is a part of script launching docker_cleanup(controller_name) function in a separate thread.

from threading import Thread
...
    threads = []
    for controller_name in controllers:
        # Remove container if it already exists
        t = Thread(target=docker_cleanup, args=(controller_name))
        threads.append(t)
        t.start()
    for t in threads:
        t.join()  # Block main thread while childs executed
...