Skip to content

Instantly share code, notes, and snippets.

View sanbei101's full-sized avatar
😄
一路向前冲

Sanbei sanbei101

😄
一路向前冲
View GitHub Profile
@sanbei101
sanbei101 / README.md
Created November 4, 2025 03:11
k3s install -china mirror

中国网络环境安装k3s

curl -sfL https://rancher-mirror.rancher.cn/k3s/k3s-install.sh | INSTALL_K3S_MIRROR=cn sh -

配置k3s拉取Image的镜像

sudo mkdir -p /etc/rancher/k3s

echo 'mirrors:
@sanbei101
sanbei101 / install.md
Last active October 16, 2025 13:58
brew安装

设置镜像

打开~/.config/fish/config.fish

nano ~/.config/fish/config.fish

设置环境变量

set -x HOMEBREW_BREW_GIT_REMOTE "https://mirrors.ustc.edu.cn/brew.git"
set -x HOMEBREW_CORE_GIT_REMOTE "https://mirrors.ustc.edu.cn/homebrew-core.git"
set -x HOMEBREW_BOTTLE_DOMAIN "https://mirrors.ustc.edu.cn/homebrew-bottles"
@sanbei101
sanbei101 / validate.go
Last active September 23, 2025 08:05
go validate query and json
package validate
import (
"encoding/json"
"fmt"
"io"
"net/url"
"reflect"
"strconv"
"strings"
@sanbei101
sanbei101 / install-docker.sh
Last active July 15, 2024 11:15
在国内服务器上快捷迅速的安装docker,符合国内网络环境!
#!/bin/bash
# 第一步:设定安装镜像
echo "设定安装镜像源为清华大学镜像..."
export DOWNLOAD_URL="https://mirrors.tuna.tsinghua.edu.cn/docker-ce"
# 第二步:脚本一键安装
echo "开始一键安装 Docker..."
wget -O- https://gitee.com/tech-shrimp/docker_installer/releases/download/latest/linux.sh | sudo -E sh
@sanbei101
sanbei101 / uzip.yml
Created April 3, 2024 06:13
上传zip自动解压到github仓库
name: extract a zip file # 工作流程的名称
on:
push: # 当有代码推送时触发
paths: # 触发条件:指定的文件路径
- '**/*.zip' # 当任何文件夹下的 .zip 文件发生变化时触发
workflow_dispatch: # 允许手动触发工作流程
jobs:
unzip-and-organize: # 工作流程中的任务名为 unzip-and-organize