Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
alomerry committed Jan 16, 2024
1 parent 1148596 commit 6650a44
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 29 deletions.
8 changes: 4 additions & 4 deletions blog/pages/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@ description: TODO
plum: true
---

[中文](./index_zh.md)
[中文](./index_zh)

Hey, I am Alomerry Wu, a backend developer.

Working at [Temu](https://www.temu.com/).<br>
Creator of [Vitest](https://github.com/vitest-dev/vitest), [Slidev](https://github.com/slidevjs/slidev), [VueUse](https://github.com/vueuse/vueuse), [UnoCSS](https://github.com/antfu/unocss), [Elk](https://github.com/elk-zone/elk), [Type Challenges](https://github.com/type-challenges/type-challenges) and [others](/projects).<br>
Core team member of [Vue](https://vuejs.org/), [Nuxt](http://nuxtjs.org/) and [Vite](http://vitejs.dev/).<br>
Creator of [xxx](), [xxx]() and [others]().<br>

Outside of programming, I enjoy doing photography and traveling. Some of my photos can be found on [Instagram](https://www.instagram.com/antfu7). If you happen to be in the same city I live (currently in Paris), maybe we can hang out and take some photos or code together.
Outside of programming, I enjoy playing games and football. Some of my videos can be found on [Bilibil](xxx). If you happen to be in the same city I live (currently in Shanghai), maybe we can xxx.

<div flex-auto />

Expand All @@ -24,6 +23,7 @@ Find me on
<a href="https://github.com/alomerry" target="_blank"><span op75 i-simple-icons-github /> GitHub</a>
<a href="https://space.bilibili.com/1" target="_blank"><span op75 i-simple-icons-bilibili /> 哔哩哔哩</a>
<a href="https://www.zhihu.com/people/1" target="_blank"><span op75 i-simple-icons-zhihu /> 知乎</a>
<a href="mailto:[email protected]" target="_blank"><span op75 i-simple-icons-gmail /> Email</a>
</p>

If you enjoy my works, consider sponsoring me on [<span i-carbon-favorite /> GitHub Sponsor](https://github.com/sponsors/alomerry) or [<span i-carbon-lightning /> 爱发电](https://afdian.net/a/21xxx3) to keep them sustainable.
11 changes: 4 additions & 7 deletions blog/pages/index_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@ description: TODO
plum: true
---

Hey, I am Alomerry Wu, a backend developer.
你好,我是清欢,一个后端开发。

Working at [Temu](https://www.temu.com/).<br>
Creator of [Vitest](https://github.com/vitest-dev/vitest), [Slidev](https://github.com/slidevjs/slidev), [VueUse](https://github.com/vueuse/vueuse), [UnoCSS](https://github.com/antfu/unocss), [Elk](https://github.com/elk-zone/elk), [Type Challenges](https://github.com/type-challenges/type-challenges) and [others](/projects).<br>
Core team member of [Vue](https://vuejs.org/), [Nuxt](http://nuxtjs.org/) and [Vite](http://vitejs.dev/).<br>
目前在 [Temu](https://www.temu.com/) 工作。<br>

Outside of programming, I enjoy doing photography and traveling. Some of my photos can be found on [Instagram](https://www.instagram.com/antfu7). If you happen to be in the same city I live (currently in Paris), maybe we can hang out and take some photos or code together.
除了编程也喜欢玩游戏和踢足球。

<div flex-auto />

Expand All @@ -22,6 +20,5 @@ Find me on
<a href="https://github.com/alomerry" target="_blank"><span op75 i-simple-icons-github /> GitHub</a>
<a href="https://space.bilibili.com/1" target="_blank"><span op75 i-simple-icons-bilibili /> 哔哩哔哩</a>
<a href="https://www.zhihu.com/people/1" target="_blank"><span op75 i-simple-icons-zhihu /> 知乎</a>
<a href="mailto:[email protected]" target="_blank"><span op75 i-simple-icons-gmail /> 邮箱</a>
</p>

If you enjoy my works, consider sponsoring me on [<span i-carbon-favorite /> GitHub Sponsor](https://github.com/sponsors/alomerry) or [<span i-carbon-lightning /> 爱发电](https://afdian.net/a/21xxx3) to keep them sustainable.
20 changes: 10 additions & 10 deletions vm/scripts/v2ray/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -293,10 +293,10 @@ get_version() {
download_v2ray() {
DOWNLOAD_LINK="https://github.com/v2fly/v2ray-core/releases/download/$RELEASE_VERSION/v2ray-linux-$MACHINE.zip"
echo "Downloading V2Ray archive: $DOWNLOAD_LINK"
if ! curl -x "${PROXY}" -R -H 'Cache-Control: no-cache' -o "$ZIP_FILE" "$DOWNLOAD_LINK"; then
echo 'error: Download failed! Please check your network or try again.'
return 1
fi
# if ! curl -x "${PROXY}" -R -H 'Cache-Control: no-cache' -o "$ZIP_FILE" "$DOWNLOAD_LINK"; then
# echo 'error: Download failed! Please check your network or try again.'
# return 1
# fi
echo "Downloading verification file for V2Ray archive: $DOWNLOAD_LINK.dgst"
if ! curl -x "${PROXY}" -sSR -H 'Cache-Control: no-cache' -o "$ZIP_FILE.dgst" "$DOWNLOAD_LINK.dgst"; then
echo 'error: Download failed! Please check your network or try again.'
Expand Down Expand Up @@ -562,12 +562,12 @@ main() {
NUMBER="$?"
if [[ "$NUMBER" -eq '0' ]] || [[ "$FORCE" -eq '1' ]] || [[ "$NUMBER" -eq 2 ]]; then
echo "info: Installing V2Ray $RELEASE_VERSION for $(uname -m)"
download_v2ray
if [[ "$?" -eq '1' ]]; then
"rm" -r "$TMP_DIRECTORY"
echo "removed: $TMP_DIRECTORY"
exit 1
fi
# download_v2ray
# if [[ "$?" -eq '1' ]]; then
# "rm" -r "$TMP_DIRECTORY"
# echo "removed: $TMP_DIRECTORY"
# exit 1
# fi
install_software 'unzip' 'unzip'
decompression "$ZIP_FILE"
elif [[ "$NUMBER" -eq '1' ]]; then
Expand Down
49 changes: 41 additions & 8 deletions vm/ubuntu.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/bin/bash

# export http_proxy=127.0.0.1:7890 https_proxy=127.0.0.1:7890
# unset http_proxy https_proxy

PROXY=127.0.0.1:7890

GIT_RAW_URL=https://raw.githubusercontent.com
Expand All @@ -14,6 +17,7 @@ FRP_PATH=${GIT_RAW_URL}/${MIX_REPOSITORY}/${BRANCH}/${MIX_VM_VPS_STATIC}/frp
NODE_VERSION=${NODE_VERSION:-"20.10.0"}
NVM_VERSION=${NVM_VERSION:-"0.39.7"}
FRP_VERSION=${FRP_VERSION:-"0.51.3"}
JAVA_VERSION=${JAVA_VERSION:-"8"}

init() {
echo "y" | apt-get install tree aptitude ca-certificates curl gnupg wget cron lsof;
Expand Down Expand Up @@ -56,7 +60,7 @@ install_acme() {
wget -P /root/.acme.sh/ $ACME_PATH/account.conf
}

install_ssl() {
set_ssl() {
case "$1" in
renew)
/root/.acme.sh/acme.sh --renew -d alomerry.com
Expand Down Expand Up @@ -99,6 +103,31 @@ install_v2ray() {
systemctl start v2ray
}

install_java() {
# 检验命令是否存在
if ! command -v javac > /dev/null 2>&1; then
apt-get install openjdk-${JAVA_VERSION}-jdk-headless -y
fi

if ! command -v javac > /dev/null 2>&1; then
apt-get install openjdk-${JAVA_VERSION}-jre-headless -y
fi
}

install_rust() {
install_java

if command -v cargo > /dev/null 2>&1; then
return;
fi
export RUSTUP_DIST_SERVER="https://rsproxy.cn"
export RUSTUP_UPDATE_ROOT="https://rsproxy.cn/rustup"

curl --proto '=https' --tlsv1.2 -sSf https://rsproxy.cn/rustup-init.sh | sh
# 此处需要回车
source "$HOME/.cargo/env"
}

install_frp() {
if [ -f ${FRP_VERSION}.version ]; then
return
Expand Down Expand Up @@ -215,6 +244,12 @@ setup() {
esac
}

install() {
for module in $@ ; do
eval "install_$module"
done
}

main() {
# ATTENTION: 安装 ansible 以使用 ansible-vault 解密
case "$1" in
Expand All @@ -227,21 +262,19 @@ main() {
frp)
install_frp $2
;;
nginx)
install_nginx
;;
acme)
install_acme
;;
ssl)
install_ssl $2
set_ssl $2
;;
nvm)
install_nvm ${@:2}
;;
build-mix)
build_mix ${@:2}
;;
install)
# acme rust nginx java
install ${@:2}
;;
setup)
setup ${@:2}
;;
Expand Down

0 comments on commit 6650a44

Please sign in to comment.