Skip to content

Instantly share code, notes, and snippets.

View Chever-John's full-sized avatar
👋
Coding

Chever John Chever-John

👋
Coding
View GitHub Profile
;设置分组标志位
custom_proxy_group=Proxies`select`.*
custom_proxy_group=Telegram`select`新加坡|狮城
custom_proxy_group=SG`select`新加坡|狮城
;设置分组标志位
;设置规则标志位
ruleset=REJECT,https://cdn.jsdelivr.net/gh/SleepyHeeead/subconverter-config@master/ruleset/external/DivineEngine/Surge/Hijacking.list
ruleset=Proxies,https://cdn.jsdelivr.net/gh/SleepyHeeead/subconverter-config@master/ruleset/force-proxy.list
ruleset=Telegram,https://ruleset.skk.moe/List/ip/telegram.conf
[General]
loglevel = notify
skip-proxy = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 100.64.0.0/10, 127.0.0.1, localhost, *.local
internet-test-url = http://connectivitycheck.platform.hicloud.com/generate_204
proxy-test-url = http://latency-test.skk.moe/endpoint
proxy-test-udp = [email protected]
bypass-system = true
# iOS
bypass-tun = 192.168.0.0/16, 172.16.0.0/12, 100.64.0.0/10, 10.0.0.0/8, 17.0.0.0/8
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCy4HdtOkEaWHhor5tW0pE+LvbcIZEECD/OXl1KM4dx8pOkPzDa+4YHc7yVxd9jK8nE6NBZTvaYPNw+VY3Sw3DWHACs0wzCDHXQOCQtc3fTS9EYPHHCfFAtjJJBRTkN8ue1uedji2M00dkK3/yxhVShvZvalBZXvEndpKEDgBPP94udlPRc0FqrQAwBbc2K3nHsVLliZtA+E/DP3/lIeSnzRz6vo/9+OAfvvLQNGrAso2WcF8ZLEZjN3pkOIrCx2bRtIubJzakSdx6kz5BYU2ohEcqYaW6qBjRNQnKLHULt9tSM0WUH+pzDmN/KaVNGc0V9BSWbHc2AODfm9rEZdQXqRdSe7y8Oc5yZkbaU1/48yRG5pvAuCfzLEP6yOf0GBi8mZLlx5UqFpySfujI+QvcAPJMwYmWHMNEnp5b7zrxW00+AfJylP94wK+iRHixWUOTa09VTJA8Q3hoWdE9rAp/iJ+VW71gNVf6jX7FKlTe8uvXBiTxxSy9EASyXMXhiPls= [email protected]
@Chever-John
Chever-John / choose_orb_machines.sh
Created February 28, 2025 07:01
select orbstack machines
#!/bin/bash
# 定义全局变量用于存储函数返回的多个值
ORB_SSH_SELECTOR_PROMPT=""
ORB_SSH_SELECTOR_MACHINE=""
# 函数:显示 OrbStack 机器列表并选择一个机器
select_orb_machine() {
local machines
@Chever-John
Chever-John / environments_for_k8s.txt
Last active February 8, 2025 10:35
environments for kubernetes
#!/usr/bin/bash
# Generate encryption key for EncryptionConfig
export ENCRYPTION_KEY=$(head -c 32 /dev/urandom | base64)
# Array of cluster machine IPs
export NODE_IPS=(192.168.31.80 192.168.31.81 192.168.31.82)
# Array of hostnames corresponding to cluster IPs
export NODE_NAMES=(k8s-master-01 k8s-slave-01 k8s-slave-02)
@Chever-John
Chever-John / README.md
Created October 31, 2023 01:00 — forked from zoilomora/README.md
How to disable systemd-resolved in Ubuntu

How to disable systemd-resolved in Ubuntu

Stages

  • Disable and stop the systemd-resolved service:

      sudo systemctl disable systemd-resolved.service
      sudo systemctl stop systemd-resolved
    
  • Then put the following line in the [main] section of your /etc/NetworkManager/NetworkManager.conf:

Parse the kubernetes manifest in yaml or json, don't care a manifest type.

Examples:

package main

import (
	"bytes"
	"context"
@Chever-John
Chever-John / check.go
Created February 4, 2023 03:44 — forked from mattes/check.go
Check if file or directory exists in Golang
if _, err := os.Stat("/path/to/whatever"); os.IsNotExist(err) {
// path/to/whatever does not exist
}
if _, err := os.Stat("/path/to/whatever"); !os.IsNotExist(err) {
// path/to/whatever exists
}
@Chever-John
Chever-John / ccoc.sh
Last active November 7, 2022 03:24
Common commands of ctr
ctr image pull docker.io/library/hello-world
ctr image pull docker.io/library/hello-world:latest
ctr image ls
ctr image ls -q
ctr c create docker.io/library/hello-world:latest demo
ctr c list
ctr image remove docker.io/library/hello-world:latest
ctr c list
ctr c remove demo
@Chever-John
Chever-John / k8s-install.md
Created October 27, 2022 01:10 — forked from islishude/k8s-install.md
k8s-国内源安装

MOVE TO HERE

注意以下命令,需要切换到 root 后运行

安装 docker

首先确定已经安装完成 docker,如果没有安装可以使用以下脚本快速安装并配置: