All posts by Roman

Activate Synapse on Super (Win) key only

It cannot be done directly from Synapse settings, but you can do it manually by editing Synapse configuration.

  1. Close Synapse
  2. Edit ~/.config/synapse/config.json
  3. Set activate to Super_L
{
  "ui" : {
    "shortcuts" : {
      "activate" : "Super_L",
      ...
    }
  }
}

There is a disadvantage of this solution. You basically can’t use any other global key combinations with Win key, because it will always trigger Synapse.

If that is a problem you can use xcape to assign an additional one-click function to a modifier key.

xcape -e 'Super_L=Super_L|space'

MikroTik and L2TP alternative for Android

Android 12 dropped support for L2TP. If you are looking for alternative and OpenVPN is not possible, because it’s setup in TAP mode, which is not supported on Android nor iPhone, you may try SSTP instead. SSTP (Secure Socket Tunneling Protocol) is protocol developed by Microsoft.

There is a open source client Open SSTP available Google Play. However MikroTik’s PAP implementation does not seem to work, so your only option is to use MS-CHAPv2, but it is more secure anyway!

Migrate subfolder to separate git repository

Let’s say you have a repository structure like below (eg. because previously it was SVN repository where everything was on one place).

  • .\Web
    • .\example.com
    • .\example.net

Now you would like to move example.com to separate git repository.

First of all, you need to install git-filter-repo.

# Clone old repository to new directory
git clone OLD_REPOSITORY example.com
cd example.com/

# Remove everything else except example.com directory
git filter-repo --path example.com/

# Make example.com new root directory
git filter-repo --subdirectory-filter example.com

# Push to a new repository
git remote add origin NEW_REPOSITORY
git push -u origin master

Connect to Mac using VNC from Windows using encrypted connection

On Mac you need to enable Remote Login and Screen Sharing.

Note: If Remote Login is not starting with message “Remote Login starting…” you might need to manually add a launch daemon:
sudo launchctl load -w /System/Library/LaunchDaemons/ssh.plist

On Windows run Powershell and create encrypted SSH tunnel. Replace USERNAME with your user name and MAC_IP_ADDRESS with IP address of your Mac.

ssh -L 25900:127.0.0.1:5900 USERNAME@MAC_IP_ADDRESS

Now use a VNC client (eg. RealVNC Viewer) and connect to 127.0.0.1:25900. RealVNC will still complain about unsecure connection but the connection will be local only (127.0.0.1).