Skip to content

Instantly share code, notes, and snippets.

View xinyii's full-sized avatar

Yi Xin xinyii

View GitHub Profile
@xinyii
xinyii / set.sh
Created September 29, 2021 01:50
[Alpine setting the timezone] #linux
apk add tzdata
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
echo "Asia/Shanghai" > /etc/timezone
apk del tzdata
@xinyii
xinyii / install.sh
Created September 30, 2021 00:53
[Alpine installs chrome to support puppeteer] #linux #puppeteer
sed -i 's/dl-cdn.alpinelinux.org/mirrors.tencentyun.com/g' /etc/apk/repositories
apk update
apk upgrade
apk add --no-cache udev ttf-freefont chromium
@xinyii
xinyii / set.sh
Created November 30, 2021 06:53
[PyPi Chinese Mirror] #python #pip
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
@xinyii
xinyii / statistics.sh
Created December 27, 2021 10:21
[Git Statistics] #git
# Count the number of rows added and deleted by each person
git log --format='%aN' | sort -u | while read name; do echo -en "$name\t"; git log --author="$name" --pretty=tformat: --numstat | awk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf "added lines: %s, removed lines: %s, total lines: %s\n", add, subs, loc }' -; done
@xinyii
xinyii / print.sh
Created January 11, 2022 07:35
[Gradle dependencies] #gradle
# print all dependencies
gradle dependencies
# print a dependeny
gradle dependencyInsight --dependency <name>