Skip to content

Instantly share code, notes, and snippets.

View levihuayuzhang's full-sized avatar

Levi Schwarzman levihuayuzhang

View GitHub Profile
@levihuayuzhang
levihuayuzhang / UWP_look_back_exemption.md
Last active November 18, 2023 09:52
UWP loop back exemption

Use one powershell command to exempt all local UWP app

Get-ChildItem -Path Registry::"HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppContainer\Mappings\" -name | ForEach-Object {CheckNetIsolation.exe LoopbackExempt -a -p="$_"}

Ref:

@levihuayuzhang
levihuayuzhang / disable-auto-sleep-gdm.sh
Created December 2, 2023 10:49
Disable auto sleep (suspend) under gdm in Debian
# show setting
sudo -u Debian-gdm dbus-run-session gsettings list-recursively org.gnome.settings-daemon.plugins.power | grep sleep
# set value to 0 to disable
sudo -u Debian-gdm dbus-run-session gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout 0
@levihuayuzhang
levihuayuzhang / README.md
Last active March 25, 2025 04:57
Run Chromium/Electron under Wayland natively (conf files apply to Arch Linux, BTW ^_^)

These Flags may only apply to Arch Linux Offical packed packages.

Flags disabled for now

  1. ~/.config/chromium-flags.conf
# --wayland-text-input-version=3 # not sure, if not using kwin or hyprland, should be added
# --disable-features=UseSkiaRenderer # not sure
# --enable-gpu-rasterization # may not needed
# --ozone-platform-hint=auto # fallback option
# --disable-features=WaylandFractionalScaleV1 # may not needed
@levihuayuzhang
levihuayuzhang / .clang-tidy
Last active January 14, 2024 04:11
clangd configuration
Checks: 'clang-analyzer-*,bugprone-*,modernize-*,performance-*,portability-*,readability-*,cert-*,cppcoreguidelines-*,google-*,llvm-*'
FormatStyle: llvm
@levihuayuzhang
levihuayuzhang / mac-alacritty-config.toml
Last active January 12, 2024 10:51
alacritty configs
# locate at ~/.config/alacritty/alacritty.toml
# theme (https://github.com/alacritty/alacritty-theme)
# theme
import = [
"~/.config/alacritty/themes/themes/everforest_dark.toml",
# "~/.config/alacritty/themes/themes/gruvbox_dark.toml",
]
# fonts
@levihuayuzhang
levihuayuzhang / keybindings.json
Created January 9, 2024 14:34 — forked from bitterteasweetorange/keybindings.json
setup vscode like neovim
[
{
"command": "projectManager.listGitProjects#sideBarGit",
"key": "cmd+o"
},
{
"command": "expand_region",
"key": "ctrl+=",
"when": "editorTextFocus"
},
@levihuayuzhang
levihuayuzhang / kitty.conf
Last active January 13, 2024 10:41
Kitty termianl config
# locate at ~/.config/kitty/kitty.conf
font_family CaskaydiaCove Nerd Font Mono
bold_font auto
italic_font auto
bold_italic_font auto
#font_size 9.0
window_padding_width 6
#include themes/everforest_dark_medium.conf
#include themes/tokyo_night_moon.conf
@levihuayuzhang
levihuayuzhang / environment
Created January 15, 2024 06:29
use adwaita dark in gnome for qt applications
# /etc/environment
QT_QPA_PLATFORMTHEME=gnome
QT_STYLE_OVERRIDE=adwaita-dark
@levihuayuzhang
levihuayuzhang / .zshrc
Created January 15, 2024 07:49
add env var for nvidia HPC SDK
source /etc/profile.d/modules.sh # install `environment-modules` (https://askubuntu.com/questions/343692/module-load-command-does-not-work)
# https://docs.nvidia.com/hpc-sdk//hpc-sdk-install-guide/index.html#install-linux-end-usr-env-settings
NVARCH=`uname -s`_`uname -m`; export NVARCH
NVCOMPILERS=/opt/nvidia/hpc_sdk; export NVCOMPILERS
export MODULEPATH=$NVCOMPILERS/modulefiles:$MODULEPATH
module load nvhpc
@levihuayuzhang
levihuayuzhang / default.custom.yaml
Last active May 2, 2025 13:08
Rime輸入法配置
patch:
"menu/page_size": 8
"translator/enable_user_dict": true
"translator/enable_encoder": true #是否开启自动造词〔仅table_translator有效〕
"translator/encode_commit_history": true #是否对已上屛词自动成词〔仅table_translator效〕
"translator/enable_sentence": true #是否开启自动造句
"translator/enable_completion": true #编码逐渐提示开关;编码提示
"translator/enable_charset_filter": true #字符集过滤,低重形码用不着