Secondary subtitles in mpv with a keyboard shortcut

Add this to your user input.conf (usually ~/.config/mpv/input.conf):

Alt+j cycle secondary-sid
Alt+J cycle secondary-sid down

Now Alt + j cycles through secondary subtitles, Alt + J does the same backwards.

Screenshot



virsh-snap.sh: create and revert external libvirt snapshots easily

There are two types of disk snapshots in libvirt: internal and external. Internal snapshots (virsh default) store all data in one file. With external snapshots, base data and snapshot data is stored separately: base disk file is left intact, and all changes are written into a separate snapshot overlay file …


Chromium web apps on KDE Plasma

Chromium has a nice feature letting you make any website behave and look similar to a regular app: have its own icon in app launcher and task bar, and open in a separate window without browser UI. The problem is, on Plasma these web apps still get grouped with each …



Install Shadowsocks proxy on Debian or Ubuntu

Server:

  • Install:
    sudo apt install shadowsocks-libev
  • Restore config from backup if you have one:
    sudo cp -a backup/etc/shadowsocks-libev /etc
    or just:
    sudo tee /etc/shadowsocks-libev/config.json << EOF
    {
        "server":"0.0.0.0",
        "server_port":8388,
        "local_port":1080,
        "password":"<password>",
        "timeout":60,
        "method":"chacha20-ietf-poly1305"
    }
    EOF
    
  • Disable server …

Connect VM to ZeroTier without ZeroTier client on it

This might be useful to connect e.g. Windows XP to ZeroTier network or other machines which you can't or don't want to install ZeroTier client to.

  1. Create ZeroTier network in control panel and join it on your host

  2. Allow Ethernet bridging for your host in control panel

    ZeroTier Control panel: Allow bridging

  3. In VM …


Reduce Akonadi memory usage to 40 MB

By default Akonadi uses MySQL and lots of agents, so total memory usage could be ~300-400 MB right from the start. If you don't need all of its capabilities, there is a way to make it use less memory.

  1. Replace MySQL with SQLite:

    sudo apt install akonadi-backend-sqlite
    sed -i 's …

Install Element (formerly Riot) on Debian, Ubuntu or derivatives

All at once:

sudo wget -O /usr/share/keyrings/element-io-archive-keyring.gpg \
          https://packages.element.io/debian/element-io-archive-keyring.gpg

echo "deb [signed-by=/usr/share/keyrings/element-io-archive-keyring.gpg] https://packages.element.io/debian/ default main" \
| sudo tee /etc/apt/sources.list.d/element-io.list

sudo apt update
sudo apt install element-desktop

Step-by-step …