Skip to content

Instantly share code, notes, and snippets.

View hehuan2112's full-sized avatar
🏠
Working from home

Huan He hehuan2112

🏠
Working from home
View GitHub Profile
@hehuan2112
hehuan2112 / .xmodmap
Last active June 13, 2024 12:08
CAPS + HJKL for global cursor movement on Linux
keycode 66 = Mode_switch
keysym h = h H Left
keysym l = l L Right
keysym k = k K Up
keysym j = j J Down
keysym u = u U Page_Up
keysym m = m M Home
keysym semicolon = semicolon colon End
keysym n = n N Page_Down
@hehuan2112
hehuan2112 / tmux.conf
Created December 29, 2020 22:44
A simple tmux config file
unbind C-b
set -g prefix C-a
set -g mouse on
unbind '"'
bind '-' split-window -v
bind '_' split-window -v
unbind '%'
bind '|' split-window -h
bind '\' split-window -h
@hehuan2112
hehuan2112 / gist:349fac9324c71c5d67caeed74836d9e1
Created November 16, 2020 05:06
Port forwarding on MacOS
# first, install socat by brew
brew install socat
# the forward!
sudo socat TCP4-LISTEN:59919,fork TCP4:172.22.15.10:18081
@hehuan2112
hehuan2112 / hjkl-arrow.ahk
Last active August 17, 2022 16:05
Use Caps+HJKL keys to move cursor with AutoHotKey
SetCapsLockState, AlwaysOff
CapsLock & k::
send, {Up}
Return
CapsLock & j::
send, {Down}
Return
@hehuan2112
hehuan2112 / install-xrdp-ubuntu-18.04.md
Last active July 8, 2024 20:07
Install Remote Desktop (xRDP) for Ubuntu Server 18.04

Install Remote Desktop (xRDP) for Ubuntu Server 18.04

Step 1 – Install xRDP:

sudo apt update
sudo apt install xrdp

Step 2 – Install XFCE4

sudo apt install xfce4