This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# RIPER-5 智能编程助手协议 | |
## 基本设置 | |
你是集成在Cursor IDE中的高智能AI编程助手,能够基于用户需求进行多维度思考并解决所有问题。 | |
但是,由于你的高级能力,经常会在没有明确请求的情况下过度热情地实施更改,这可能导致代码逻辑错误。为防止这种情况,你必须**严格遵循此协议**。 | |
**语言设置**: 除非用户另有指示,所有常规交互响应应使用中文。但模式声明(如[MODE: RESEARCH])和特定格式输出(如代码块)应保持英文以确保格式一致性。 | |
**模式声明要求**: 必须在每个响应开头用方括号声明当前模式,格式:`[MODE: MODE_NAME]` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# 可配置部分 | |
CLUSTER_NAME="mongo-cluster1" # 集群名称 | |
BASE_PORT=27017 # 基础端口号 | |
MONGO_VERSION="5.0" # MongoDB版本 | |
MONGO_USERNAME="root" # MongoDB用户名 | |
MONGO_PASSWORD="123456" # MongoDB密码 | |
# 端口配置 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# export http_proxy=http://##替换成自己的代理地址## | |
# export https_proxy=http://##替换成自己的代理地址## | |
# 使用官方源安装docker | |
apt update | |
apt install -y \ | |
ca-certificates \ | |
curl \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function get_timezone() | |
local now = os.time() | |
return os.difftime(now, os.time(os.date("!*t", now))) | |
end | |
local epoch = get_timezone() | |
function parse_json_date(json_date) | |
local year, month, day, hour, minute, seconds, offsetsign, offsethour, offsetmin = json_date:match("(%d+)%-(%d+)%-(%d+)%a(%d+)%:(%d+)%:([%d%.]+)([Z%+%- ])(%d?%d?)%:?(%d?%d?)") | |
local timestamp = os.time{year = year, month = month, day = day, hour = hour, min = minute, sec = math.floor(seconds)} + epoch | |
local offset = 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEditor; | |
public class ImageProcessor : AssetPostprocessor | |
{ | |
private void OnPreprocessTexture() | |
{ | |
var importer = assetImporter as TextureImporter; | |
if (null == importer) | |
{ | |
return; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package Utils | |
import ( | |
"errors" | |
"io" | |
"math" | |
) | |
func WriteCSharpString(writer io.Writer, value string) error { | |
buffer := []byte(value) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# 安装docker(使用阿里云源) | |
yum install -y yum-utils device-mapper-persistent-data lvm2 | |
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo | |
yum -y install docker-ce | |
systemctl start docker | |
# 迁移docker目录(可选) | |
systemctl stop docker docker.socket |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
namespace Utils | |
{ | |
public class MonoSingleton<T> : MonoBehaviour where T : MonoSingleton<T> | |
{ | |
public static T Inst | |
{ | |
get | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Http { | |
public static Inst(): Http { | |
if (null == Http._inst) { | |
Http._inst = new Http(); | |
} | |
return Http._inst; | |
} | |
private static _inst: Http; | |
public constructor() { |
NewerOlder