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
  • 11:55 (UTC +08:00)
View GitHub Profile
@xuzh0u
xuzh0u / empty_artifacts.sh
Created April 24, 2026 04:16
使用gh手动清除现有仓库的所有artifacts
#!/bin/bash
# 但是更推荐单步手动执行
# 用 gh 获取当前仓库的所有 artifacts 的 id
# 这里用重定向 > 符号,强制把输出写进文件,这绝对不会触发分页器
gh api repos/{owner}/{repo}/actions/artifacts --paginate -q '.artifacts[].id' > ../ids.txt
# 检查一下文件内容
cat ../ids.txt
@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",