Skip to content

Instantly share code, notes, and snippets.

name run-potter-loop
description 使用 CodexPotter 风格的多轮 fresh-context 子代理流程驱动当前分支迭代。用于用户要求用 Potter loop、run-potter-loop、子代理循环、多轮 review/fix、或对当前分支相对 master 反复 review、修复并提交,直到 review no finding 或达到轮次上限。

Potter Loop 循环

核心模型

主 thread 扮演 CodexPotter 的控制面:做 preflight、保存用户原始请求、按轮次给子代理发任务、等待返回、记录结果、决定是否继续、最后总结。每轮使用一个新的子代理;同一轮内先让这个子代理 review,若有 finding,再让同一个子代理继续复核并修复。

@SunRunAway
SunRunAway / dump_profile.bash
Last active July 3, 2020 12:42
dump_profile.bash <pid> <status_port> <memory threshold(byte)>
#!/bin/bash
# usage:
# dump_profile.bash <pid> <db_port> <status_port> <memory threshold(byte)>
pid=$1
db_port=$2
status_port=$3
mem_threshold=$4
@SunRunAway
SunRunAway / cherry_pick_pull.sh
Last active March 26, 2024 03:24
cherry_pick_pull.sh upstream/release-3.0 <pr number> //fork from https://github.com/kubernetes/kubernetes/blob/master/hack/cherry_pick_pull.sh
#!/usr/bin/env bash
# Copyright 2015 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@SunRunAway
SunRunAway / git-pr
Created June 26, 2019 09:17
Use `git pr` to quickly send a pull request in browser.
#!/bin/bash
# put this file in your $PATH
# and chmod +x git-pr
# then use `git pr` in one github repo
repo=`git remote -v | grep push | grep origin | sed -e "s/.*github.com[:/]\(.*\)\.git.*/\1/"`
branch=`git name-rev --name-only HEAD`
echo "... creating pull request for branch \"$branch\" in \"$repo\""
open https://github.com/$repo/pull/new/$branch
@SunRunAway
SunRunAway / qiniusign.go
Last active August 29, 2015 14:17
sign a qiniu request
package main
import (
"flag"
"fmt"
"io"
"net/http"
"os"
"strings"
@SunRunAway
SunRunAway / 获取字幕.workflow
Last active August 29, 2015 14:15
获取字幕.workflow
on run {input, parameters}
set SSCL to "~/bin/sscl"
set theList to input as list
set theLog to ""
do shell script "mkdir -p ~/Library/Application\\ Support/SPlayerX/SVPSub/"
do shell script "echo test > ~/Library/Application\\ Support/SPlayerX/SVPSub/README"
do shell script "mkdir -p ~/Library/Application\\ Support/SPlayerX/SVPSub.bak/"
do shell script "mv ~/Library/Application\\ Support/SPlayerX/SVPSub/* ~/Library/Application\\ Support/SPlayerX/SVPSub.bak/"
#do shell script "rm -rf ~/Library/Application\\ Support/SPlayerX/SVPSub/"
repeat with theItem in theList
// ==UserScript==
// @name Google SSL Privacy Real Link
// @namespace http://userscripts.org/scripts/show/145014
// @description Mandatory use encryption connection https. Gets rid of almost every google tracking device. Disable the Google search rewrite, always showing and using the real, original, direct link URLs, also to prevent from using redirected pages that might be temporarily unavailable in some area.
// @include http://images.google.*/images*
// @include http://www.google.*/images*
// @include http://www.google.*/webhp*
// @include http://www.google.*/search?*
// @include http://www.google.*/imgres*
// @include http://images.google.*/search?*
@SunRunAway
SunRunAway / 0_reuse_code.js
Last active August 29, 2015 14:07
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@SunRunAway
SunRunAway / cheapest-steam.go
Last active August 29, 2015 13:59
cheapest-steam
/*
cheapest-steam
==============
A crawler to retrieve cheapest item price on steam.
```
go run main.go -url http://steamcommunity.com/market/listings/570/Taunt%3A%20Get%20Burned
```
*/