Skip to content

Instantly share code, notes, and snippets.

View levihuayuzhang's full-sized avatar

Huayu Zhang levihuayuzhang

View GitHub Profile
@levihuayuzhang
levihuayuzhang / ubuntu-zh-cn-input.md
Last active March 22, 2024 07:26
Ubuntu安裝中文輸入法
sudo apt install ibus ibus-rime ibus-gtk ibus-gtk4 ibus-gtk3
sudo apt install ibus-pinyin ibus-sunpinyin

重新login後,在keyboard選擇: ibus-rime 默認爲繁體,ibus-pinyinibus-sunpinyin爲簡體。

sudo vim /etc/environment

@levihuayuzhang
levihuayuzhang / mac-service-root.md
Last active February 3, 2024 09:17
MacOS create service with launchctl and .plist file with root
@levihuayuzhang
levihuayuzhang / default.custom.yaml
Last active January 28, 2024 07:39
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 #字符集过滤,低重形码用不着
@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 / 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 / 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 / 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 / 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 / .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 / chromium-flags.conf
Created December 29, 2023 12:36
Run Chromium/Electron under Wayland natively
# ~/.config/chromium-flags.conf
--use-gl=egl
--ignore-gpu-blocklist
--enable-gpu-rasterization
--ozone-platform=wayland
--gtk-version=4
--enable-features=TouchpadOverscrollHistoryNavigation
--disable-features=WaylandFractionalScaleV1