Skip to content

Instantly share code, notes, and snippets.

View xuzh0u's full-sized avatar

Xuzhou Zheng xuzh0u

View GitHub Profile
@xuzh0u
xuzh0u / chinese_input_in_manjaro.md
Created June 3, 2023 04:52 — forked from jasonzhouu/chinese_input_in_manjaro.md
Config Chinese input method in Manjaro(Manjaro 配置中文输入法)

1. install packages

run:

yay -Syu adobe-source-han-sans-otc-fonts adobe-source-han-serif-otc-fonts 
yay -Syu fcitx fcitx-googlepinyin fcitx-im fcitx-configtool 

2. config environmental variables

sudo vim /etc/profile
@xuzh0u
xuzh0u / fiucas.sh
Created June 4, 2022 12:35
如何在Linux系统尽可能保证UCAS校园网不断连?
#!/bin/bash
while true
do
loss_rate=$(ping www.baidu.com -c 4 | grep "packet loss" | awk -F, {'print$3'} | cut -d' ' -f2)
if [ "$loss_rate" != "0%" ]
then
nmcli conn up UCAS
# PUT YOUR CURL COMMAND HERE 去用浏览器开发者工具的 network 面板找到提交表单的请求,copy as CURL 然后粘贴到这里
fi
@xuzh0u
xuzh0u / lab-report.css
Last active April 24, 2022 08:19
Some configuration of the format issues when writing markdown docs.
<!--Typora自用覆盖设置-灵感来源为体系结构实验报告要求-->
/*font-family*/
h1,
h2,
h3,
h4,
h5,
h6 {
font-family: "Linux Libertine", "Times New Roman", "Source Han Sans CN",
@xuzh0u
xuzh0u / deploy.sh
Last active March 21, 2021 14:56
deploy script
#!/bin/bash
printf "\033[0;33mDeploying updates to GitHub...\033[0m\n"
# Add changes to git.
git add .
# Commit changes.
msg="Published on $(date +'%Y-%m-%d %H:%M:%S')"
if [ -n "$*" ]; then