Skip to content

Instantly share code, notes, and snippets.

View xuzh0u's full-sized avatar

Xuzhou Zheng xuzh0u

  • University of Chinese Academy of Sciences
  • Beijing
  • 13:27 (UTC +08:00)
View GitHub Profile
@xuzh0u
xuzh0u / contactsNameAddPinyin.swift
Created March 1, 2025 10:14
在 Mac 上,根据通讯录联系人中文名批量添加注音信息 [由ChatGPT-4o生成]
// 使用方法:保存为文件,在命令行键入 `swift <file.swift>` 回车运行
import Foundation
import Contacts
extension String {
func phonetic() -> String {
let src = NSMutableString(string: self) as CFMutableString
CFStringTransform(src, nil, kCFStringTransformMandarinLatin, false)
return String(src)
@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 / 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",