Skip to content

Instantly share code, notes, and snippets.

@joshschmelzle
joshschmelzle / remap-capslock-to-control-win10.md
Last active October 19, 2025 20:02
Remap Caps Lock to Control on Windows 10

Ways to remap caps lock to control on Windows 10

These methods in this gist worked for me on my U.S.-based keyboard layouts. I am unsure about other layouts. If you have problems, revert your changes; delete the registry key you created (and reboot).

Update: you should probably scroll down to approach 4 where I suggest using Microsoft PowerToys Keyboard Manager.

Approach 1. Manually through regedit

Navigate to and create a new binary value in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout named Scancode Map.

@frgomes
frgomes / install-docker.sh
Last active June 6, 2021 18:52
Debian - install docker in Debian Jessie
#!/bin/bash
# compiled from https://docs.docker.com/engine/installation/linux/debian/#/debian-jessie-80-64-bit
sudo apt-get update
sudo apt-get dist-upgrade -y
sudo apt-get install apt-transport-https ca-certificates -y
sudo sh -c "echo deb https://apt.dockerproject.org/repo debian-jessie main > /etc/apt/sources.list.d/docker.list"
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
@ryerh
ryerh / tmux-cheatsheet.markdown
Last active November 5, 2025 08:05 — forked from MohamedAlaa/tmux-cheatsheet.markdown
Tmux 快捷键 & 速查表 & 简明教程

注意:本文内容适用于 Tmux 2.3 及以上的版本,但是绝大部分的特性低版本也都适用,鼠标支持、VI 模式、插件管理在低版本可能会与本文不兼容。

Tmux 快捷键 & 速查表 & 简明教程

启动新会话:

tmux [new -s 会话名 -n 窗口名]

恢复会话:

1. raid
1.1 查看物理卷信息
/opt/MegaRAID/MegaCli/MegaCli64 -pdlist -aall
1.2 查看逻辑卷+物理卷
/opt/MegaRAID/MegaCli/MegaCli64 -ldpdinfo -aall
1.2.1 查看逻辑卷
/opt/MegaRAID/MegaCli/MegaCli64 -ldinfo -lall -aall
@FokkeZB
FokkeZB / README.md
Created September 20, 2013 09:38
URL schemes for iOS and Android (2/2)
@darkhelmet
darkhelmet / balance.go
Created June 16, 2013 05:05
Simple TCP load balancer in Go.
package main
import (
"flag"
"io"
"log"
"net"
"strings"
)
@binux
binux / daemon.sh
Last active June 22, 2024 18:52
防止多重启动的守护进程
#!/usr/bin/env bash
if [ ! $STY ]; then
screen -S $(basename ${0%.*}) -U -d -m $0 $*
exit 0
fi
if [ ! $LOCK ]; then
LOCK=$(basename ${0%.*}).lock
fi