适用对象:日常把 OpenClaw 当作个人助理/自动化管家的同学。
一句话使用 : 按照 openclaw-workspace-clean-guide.md https://gist.github.com/luw2007/863349759b90bfd2ffeab41298a52e21 优化一下 当前 openclaw 的配置,让 workspace 目录永远“可读、可找、可回滚、可复盘”。
适用对象:日常把 OpenClaw 当作个人助理/自动化管家的同学。
一句话使用 : 按照 openclaw-workspace-clean-guide.md https://gist.github.com/luw2007/863349759b90bfd2ffeab41298a52e21 优化一下 当前 openclaw 的配置,让 workspace 目录永远“可读、可找、可回滚、可复盘”。
| #!/usr/bin/env python3 | |
| from __future__ import annotations | |
| """ | |
| clip2file.py — 将剪贴板中的长文本/富文本保存为 Markdown 文件, | |
| 并将"文件对象"写回剪贴板(可在邮件/聊天/IDE 中直接粘贴附件)。 | |
| 富文本处理策略(参考 paste-to-markdown Raycast 扩展): | |
| 1. 用 osascript 读取剪贴板的 HTML 格式(保留链接、格式信息) | |
| 2. 用内置 html.parser 将 HTML 转为 Markdown(不转义下划线等正文字符) | |
| 3. 回退:若剪贴板无 HTML,直接使用 pbpaste 纯文本 |
| package main | |
| import ( | |
| "fmt" | |
| "testing" | |
| "time" | |
| ) | |
| // WHY: | |
| // |
| package main | |
| import ( | |
| "fmt" | |
| "github.com/google/go-cmp/cmp" | |
| ) | |
| func isSpace(b byte) bool { | |
| switch b { |
| package log | |
| import ( | |
| "bytes" | |
| "path" | |
| "time" | |
| "github.com/gin-gonic/gin" | |
| "github.com/lestrrat/go-file-rotatelogs" | |
| "github.com/pkg/errors" |
| #ifndef __AE_H__ | |
| #define __AE_H__ | |
| #include <time.h> | |
| #define AE_OK 0 | |
| #define AE_ERR -1 | |
| #define AE_NONE 0 /* No events registered. */ | |
| #define AE_READABLE 1 /* Fire when descriptor is readable. */ |
| """ | |
| redis proxy | |
| 用来展示redis协议 | |
| """ | |
| import asyncio | |
| redis_addr = ('127.0.0.1', 6379) | |
| proxy_addr = ('127.0.0.1', 6380) | |
| //http://www.it165.net/os/html/201308/5868.html | |
| #include <sys/socket.h> | |
| #include <sys/wait.h> | |
| #include <netinet/in.h> | |
| #include <netinet/tcp.h> | |
| #include <sys/epoll.h> | |
| #include <sys/sendfile.h> | |
| #include <sys/stat.h> | |
| #include <unistd.h> | |
| #include <stdio.h> |
| #!/bin/sh | |
| # 版本号类似于 MAJOR.MINOR.PATCH 遵循 Semantic Versioning 2.0.0: | |
| # MAJOR: 主版本号,不兼容的修改,如:底层重构、框架层变动 | |
| # MINOR:次版本号,向前兼容的修改,如:增加新功能、代码优化 | |
| # PATCH: 小版本号,修复bug | |
| PREFIX=v | |
| DEFAULT_VERSION=0.0.0 | |
| # 获取git版本号 |
| 0xA62D03dA4F56043663859c9173E8E6ad9A24C40a |