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



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 …


Create persistent local SSH server forwarding with autossh

UPD: Just use ZeroTier — open source, cross-platform, secure and easy to use virtual LAN. Add your remote computers to a virtual network and connect to them as if they are in the same LAN. Connections are end-to-end encrypted and P2P, so you always get the best speed and latency possible …