Skip to content

Instantly share code, notes, and snippets.

@pyksy
pyksy / hp_laptop_keys.ahk
Last active October 9, 2019 11:34
AutoHotkey: Remap HP laptop Screenshare, Answer and Hangup keys to Home, End and Insert keys
; AutoHotkey script to remap HP 840g, 1050g etc... laptops' Screenshare, Answer and Hangup keys to Home, End and Insert keys
; Share screen key
<!<^F22::Send {Home}
+<!<^F22::Send {Shift Down}{Home}{Shift Up}
; Answer key
<!F15::
KeyWait,LWin
reload
@pyksy
pyksy / gist:bd582a1ba03d046c9289782c39057c86
Last active November 9, 2019 14:01
Ethernet tap between two hosts using SoftEther
Server side:
add-apt-repository ppa:paskal-07/softethervpn
apt-get install softether-vpnserver
vpncmd localhost:443 /server /cmd HubCreate VPN /password:admin
vpncmd localhost:443 /server /cmd BridgeCreate VPN /Device:bridge /tap:yes
ip addr add 10.0.0.1/24 dev tap_bridge
vpncmd localhost:443 /server /hub:VPN /cmd UserCreate vpnuser /group:none /realname:none /note:none
vpncmd localhost:443 /server /hub:VPN /cmd UserPasswordSet vpnuser /password:hunter2 /type:standard
Client side:
@pyksy
pyksy / kick47111custom.txt
Last active April 8, 2025 22:26
Amiga: Capitoline: Build 1MB (or bigger) custom Kickstart 3.2.2 ROM image for SKick sofkicking
# Copy ROM images to ROMs/ and other kickstart modules to Modules/
# and then build the kickstart file. On Linux, run:
# ./capcli.Linux <kick47111custom.txt
# v47.102 ROM image
alias OLDROM "ROMs/kick47102.a1200.rom"
# v47.111 ROM image
alias SOURCEROM "ROMs/kick47111.a1200.rom"
# Resulting custom ROM image
alias TARGETROM "ROMs/kick47111custom.a1200"
@pyksy
pyksy / hotspot.sh
Created April 2, 2025 08:40
Standalone WiFi hotspot - Raspberry Pi Zero W - Bookworm
apt-get install dnsmasq
cat <<EOF >/etc/dnsmasq.conf
port=53
interface=wlan0
except-interface=lo
listen-address=10.42.0.1
dhcp-range=10.42.0.5,10.42.0.250,12h
dhcp-option=option:router,10.42.0.1
dhcp-option=option:dns-server,10.42.0.1
dhcp-option=option:netmask,255.255.255.0
@pyksy
pyksy / kick47115custom.a1200.txt
Last active April 8, 2025 11:43
Amiga: Capitoline: SKick: Build 1MB (or any size!) custom Kickstart 3.2.3 ROM image for sofkicking
# Copy source ROM image to ROMs/ and other kickstart modules to Components/
# and then build the kickstart file.
# For example on Linux, run:
# ./capcli.Linux <kick47115custom.a1200.txt
# Copy ROMs/kick47115custom.a1200 and .RTB to Amiga and softkick:
# SKick kick47115custom.a1200 32BIT
# Make sure you are using Capitoline Release 2025.04.05 or newer;
# older versions lack the required kickstart and module hashes for 3.2.3.
@pyksy
pyksy / gist:43379ef5d0af2ff722994d39b42f6f62
Created October 22, 2025 11:09
Get back lost/missing WSL GUI (X11) application windows
Sometimes the WSL GUI (X11) applications just disappear from Windows: the apps are no longer visible on Task Bar and whe application windows are nowhere to be seen. The culprit seems to be the Microsoft Remote Desktop Client (msrdc.exe) getting messed up on its own. To fix:
1. In Windows PowerShell, as user, terminate the msrdc.exe process; it will immediately respawn:
Get-Process -Name "msrdc" -ErrorAction SilentlyContinue | Stop-Process -Force
2. In WSL Linux shell, as user, unmap and map the GUI (X11) application windows to get them visible again with the freshly respawned msrdc.exe process:
for i in $(xdotool search -name .); do xdotool windowunmap $i; xdotool windowmap $i; done