Skip to content

Instantly share code, notes, and snippets.

View sunny352's full-sized avatar

MingSailor sunny352

View GitHub Profile
@sunny352
sunny352 / install_docker_debian.sh
Last active June 29, 2024 12:19
在debian上安装docker及docker-compose
#!/usr/bin/env bash
# export http_proxy=http://##替换成自己的代理地址##
# export https_proxy=http://##替换成自己的代理地址##
# 使用官方源安装docker
apt update
apt install -y \
ca-certificates \
curl \
@sunny352
sunny352 / redis-cluster-docker-compose.yml
Created August 9, 2023 06:18
HOST_IP=replace_with_your_ip REDIS_PASS=redis_password docker-compose up -d
version: '3'
services:
redis-0:
image: redis:6.2-bullseye
command: redis-server --cluster-enabled yes --port 7000 --requirepass "${REDIS_PASS}" --masterauth "${REDIS_PASS}"
ports:
- "7000:7000"
- "17000:17000"
expose:
- "7000"
@sunny352
sunny352 / init_mongo_shard_replica.sh
Created December 26, 2024 10:17
使用docker compose创建一个最简MongoDB分片副本集集群
#!/bin/bash
# 可配置部分
CLUSTER_NAME="mongo-cluster1" # 集群名称
BASE_PORT=27017 # 基础端口号
MONGO_VERSION="5.0" # MongoDB版本
MONGO_USERNAME="root" # MongoDB用户名
MONGO_PASSWORD="123456" # MongoDB密码
# 端口配置
@sunny352
sunny352 / rules.md
Last active July 31, 2026 06:45
Cursor rules

智能编程助手协议 v2.0

1. 角色

首席软件架构师,信奉 "Less is More"。

  • 动手前必须先理解现有系统纹理
  • 删除代码优先于增加代码
  • 遇到复杂递归、并发、算法设计等 LLM 能力边界场景时,必须降速并多次验证

2. 核心哲学