Skip to content

Instantly share code, notes, and snippets.

View kvnxiao's full-sized avatar
🐵

Kevin Xiao kvnxiao

🐵
View GitHub Profile
@kvnxiao
kvnxiao / installed.txt
Last active May 28, 2024 20:27
Windows 11 Installed CLI stuff
❯ scoop list && cargo install-update -l && winget list | rg winget
Installed apps:
Name Version Source Updated Info
---- ------- ------ ------- ----
fastfetch 2.13.2 main 2024-05-27 13:06:08
firacode-nf-mono 3.2.1 nerd-fonts 2024-04-14 23:34:37
fvm 3.1.4 extras 2024-04-24 03:18:16
imagemagick 7.1.1-33 main 2024-05-27 13:07:53
innounp 0.50 main 2024-01-22 22:28:13
@kvnxiao
kvnxiao / generate_keyboardevent_code_values.js
Last active November 16, 2023 10:31
Generate KeyboardEvent.code values from MDN Table
// Generates string union type values from Keyboard event code values taken from the MDN table located at:
// https://developer.mozilla.org/en-US/docs/Web/API/UI_Events/Keyboard_event_code_values#code_values_on_windows
const table = document.querySelector("table.standard-table");
const firefox = table.querySelectorAll("tbody > tr > td:nth-child(2) > code:first-child");
const ignoreList = ["\"\"", "\"Unidentified\""];
const codes = [...new Set([...firefox].map((node) => node.innerText))].filter(s => !ignoreList.includes(s));
console.log("export type KeyCode =", codes.join("\n | "));
@kvnxiao
kvnxiao / zoom65_via.json
Created May 11, 2022 08:26
zoom65_via.json
{
"name": "zoom65",
"vendorProductId": 2154561541,
"macros": [
"{KC_LALT,KC_F4}",
"{KC_LGUI,KC_Q}",
"",
"",
"",
"",
@kvnxiao
kvnxiao / cargo_install_list.txt
Last active April 26, 2022 04:27
cargo install --list
cargo-update v8.1.2:
cargo-install-update-config.exe
cargo-install-update.exe
jean v0.1.0 (C:\Users\kvnxiao\github\rc-zip\samples\jean):
jean.exe
when-cli v0.4.0:
when.exe
@kvnxiao
kvnxiao / scoop list
Created April 25, 2022 00:16
scoop list
❯ scoop list
Installed apps:
Name Version Source Updated Info
---- ------- ------ ------- ----
fd 8.3.2 main 2022-01-29 20:01:45
ffmpeg 5.0.1 main 2022-04-09 03:04:23
FiraCode-NF 2.1.0 nerd-fonts 2022-04-15 17:04:55
fnm 1.31.0 main 2022-02-17 00:02:01
fzf 0.30.0 main 2022-04-04 18:04:25
@kvnxiao
kvnxiao / spacebarrc
Created April 11, 2022 21:54
spacebarrc
#!/usr/bin/env sh
spacebar -m config position top
spacebar -m config height 22
spacebar -m config text_font "SF Pro:Medium:12.0"
spacebar -m config icon_font "SF Pro:Medium:12.0"
spacebar -m config background_color 0xff1f2430
spacebar -m config foreground_color 0xffffffff
spacebar -m config space_icon_color 0xffffcc66
spacebar -m config power_icon_color 0xffffa759
@kvnxiao
kvnxiao / yabairc
Created April 11, 2022 21:51
yabairc
#!/usr/bin/env sh
yabai -m config external_bar all:22:0
yabai -m config top_padding 15
yabai -m config bottom_padding 15
yabai -m config left_padding 15
yabai -m config right_padding 15
yabai -m config window_gap 15
yabai -m config layout bsp
@kvnxiao
kvnxiao / skhdrc
Created April 11, 2022 21:42
shkd for yabai, macos
# focus window
ctrl + alt - i : yabai -m window --focus north
ctrl + alt - j : yabai -m window --focus west
ctrl + alt - k : yabai -m window --focus south
ctrl + alt - l : yabai -m window --focus east
# swap window
ctrl + shift + alt - i : yabai -m window --swap north
ctrl + shift + alt - j : yabai -m window --swap west
ctrl + shift + alt - k : yabai -m window --swap south
@kvnxiao
kvnxiao / DefaultKeyBinding.dict
Created April 11, 2022 21:13
~/Library/KeyBindings/DefaultKeyBinding.dict
{
"\UF729" = "moveToBeginningOfLine:"; // home
"\UF72B" = "moveToEndOfLine:"; // end
"$\UF729" = "moveToBeginningOfLineAndModifySelection:"; // shift-home
"$\UF72B" = "moveToEndOfLineAndModifySelection:"; // shift-end
"@\UF729" = "moveToBeginningOfDocument:"; // cmd-home
"@\UF72B" = "moveToEndOfDocument:"; // cmd-end
"@$\UF729" = "moveToBeginningOfDocumentAndModifySelection:"; // cmd-shift-home
"@$\UF72B" = "moveToEndOfDocumentAndModifySelection:"; // cmd-shift-end
"@\UF702" = "moveWordLeft:"; // cmd-left
@kvnxiao
kvnxiao / wezterm.lua
Last active April 25, 2022 00:12
wezterm.lua
local wezterm = require 'wezterm';
if wezterm.target_triple == "x86_64-pc-windows-msvc" then
default_prog = {
"C:\\Program Files\\PowerShell\\7\\pwsh.exe", "-WorkingDirectory", "~"
}
else
default_prog = {"zsh"}
end