Complete guide to install and configure OpenClaw on Windows 11 using WSL2 (Windows Subsystem for Linux).
| /** | |
| * USB HID Keyboard scan codes as per USB spec 1.11 | |
| * plus some additional codes | |
| * | |
| * Created by MightyPork, 2016 | |
| * Public domain | |
| * | |
| * Adapted from: | |
| * https://source.android.com/devices/input/keyboard-devices.html | |
| */ |
Normally, it is sufficient to grab the Go MSI installer from the website in order to set up the toolchain. However, some packages that provide Go wrappers for C libraries rely on cgo tool, which in turn, needs the GCC toolchain in order to build the glue code. Also, 3rd-party dependencies are usually hosted on services like GitHub, thus Git is also needed. This mini-guide illustrates how to setup a convenient development environment on Windows using MSYS2.
| // +build windows | |
| package screen | |
| import ( | |
| "fmt" | |
| "image" | |
| "reflect" | |
| "syscall" | |
| "unsafe" |
| package main | |
| import ( | |
| "fmt" | |
| "log" | |
| "syscall" | |
| "unsafe" | |
| ) | |
| var ( |
Find input audio rate beforehand thus:
ffmpeg -i input.mp4
Assuming input audio rate 44,100 Hz, this command will do the job:
ffmpeg -i input.mp4 -af asetrate=44100*3/4,atempo=4/3 output.mp4
The factor of 3/4 will change most female and “skinny” (chipmunk) voices into male and “fat” voices. Use 4/3 for the opposite:
| # Vncserver service file for Debian or Ubuntu with systemd | |
| # | |
| # Install vncserver and tools | |
| # e.g. apt-get install tightvncserver autocutsel gksu | |
| # | |
| # 1. Copy this file to /etc/systemd/system/vncserver@:1.service | |
| # 2. Edit User= | |
| # e.g "User=paul" | |
| # 3. Edit the vncserver parameters appropriately in the ExecStart= line! | |
| # e.g. the -localhost option only allows connections from localhost (or via ssh tunnels) |
| // RCL 05 June 2021 | |
| /* | |
| verify with `openssl pkey -in <privatekey>` or `openssl pkey -in <privatekey> -pubout` | |
| the latter should match the publickey | |
| */ | |
| package main | |
| import ( |
This is a gist with a set of helpful performance tricks and best practices that I've found on the internet.