Skip to content

Instantly share code, notes, and snippets.

View reorx's full-sized avatar
YOLO

Xiao Meng reorx

YOLO
View GitHub Profile
@reorx
reorx / command_space_commitment.json
Created May 11, 2022 08:38
karabiner element complex modification to ensure command + space combination could be received by the system
{
"description": "command + space commitment",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "space",
"modifiers": {
"mandatory": [
"left_command"
@reorx
reorx / remap-capslock-to-control-win10.md
Created January 17, 2022 05:28 — forked from joshschmelzle/remap-capslock-to-control-win10.md
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.

之前一直是全空格写法,即中文与所有非中文之间全部加上空格,但近来感觉到这种写法在有些情况下既低效又不美观,因此想把不同情况列出,对比增加空格与否的优劣得失。

请注意,本文仅为个人看法,旨在探讨不同书写方式的可能性,不对其他规范进行赞成或反对。

以下书写元素将被涉及:

  • 中文字
  • 中文标点
  • 英文字母(代表所有拉丁字母)
  • 半角标点
  • 数字
@reorx
reorx / vscode-legacy-project-settings.json
Created March 11, 2020 06:29
disable all possible automatic actions and formatters
{
"eslint.enable": false,
"javascript.format.enable": false,
"javascript.validate.enable": false,
"editor.trimAutoWhitespace": false,
"files.trimTrailingWhitespace": false,
"json.format.enable": false
}
@reorx
reorx / clash.apple_special_treatment.yaml
Last active February 13, 2020 05:50
Clash config that matches all apple domains/IPs for proxy
port: 7890
socks-port: 7891
allow-lan: true
mode: Rule
log-level: info
external-controller: 127.0.0.1:9090
Proxy:
- name: "your proxy"
type: vmess
...
@reorx
reorx / thunderbird_customization.md
Last active July 27, 2022 15:50
Thunderbird customization configs
@reorx
reorx / Firefox_userChrome.css
Created April 30, 2019 09:28
`~/Library/Application Support/Firefox/Profiles/<id>.default`
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
#TabsToolbar {
visibility: collapse !important;
}
#nav-bar {
padding-top: 10px !important;
padding-left: 10px !important;
}
@reorx
reorx / Firefox_userChrome.css
Created April 30, 2019 09:28
`~/Library/Application Support/Firefox/Profiles/<id>.default`
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
#TabsToolbar {
visibility: collapse !important;
}
#nav-bar {
padding-top: 10px !important;
padding-left: 10px !important;
}
@reorx
reorx / codepoint.py
Created February 12, 2019 05:36
functions that perform string literals like `u'`, 'b'`, works for both Python 2 and Python 3
"""
An example usage of string_literals.py, shows code point table from command line.
```
codepoint.py '你好,世界'
Char Ord Hex Code Point
你 20320 0x4f60 U+4F60
好 22909 0x597d U+597D
, 65292 0xff0c U+FF0C
世 19990 0x4e16 U+4E16