Skip to content

Instantly share code, notes, and snippets.

View pahud's full-sized avatar
🏠
Working from home

Pahud Hsieh pahud

🏠
Working from home
View GitHub Profile
@pahud
pahud / example.md
Created February 6, 2026 02:43
一次創建路人甲乙丙丁四個subagents

使用方式

直接跟Agent說:

參考以網址下配置範例, 設定四個subagents,名稱比照下面的配置,唯獨home dir做相應的修改符合實際路徑。注意:只新增或修改 subagents 配置即可,model部分不要調整。 https://gist.github.com/pahud/141c35bd9a84af0befe52a4ff475bd2f

 "agents": {
@pahud
pahud / openclaw.json
Created February 6, 2026 02:02
OpenClaw multi-agent sample
{
"bindings": [
{
"agentId": "main",
"match": {
"channel": "telegram",
"accountId": "default"
}
},
{
@pahud
pahud / openclaw.json.md
Last active February 5, 2026 18:06
~/.openclaw/openclaw.json for Aamzon Bedrock API KEY
cat ~/.openclaw/openclaw.json | jq -r .models
{
  "mode": "merge",
  "providers": {
    "bedrock": {
@pahud
pahud / qchat.sh
Created June 11, 2025 00:20
~/.local/bin/qchat.sh
#!/bin/bash
echo "Searching for trusted tools..."
TOOLS=$(grep -v "not trusted$" "$0" | grep "trusted$" | sed 's/^- \([^ ]*\).*/\1/' | tr '\n' ',' | sed 's/,$//')
echo "Found tools: $TOOLS"
if [ -z "$TOOLS" ]; then
echo "Warning: No trusted tools found!"
exit 1
fi
#!/bin/sh
kubectl --namespace=kube-system get po
helm upgrade --install --create-namespace -n nginx my-nginx oci://registry-1.docker.io/bitnamicharts/nginx
kubectl --namespace=nginx get po
@pahud
pahud / updatePrice.ts
Last active May 12, 2022 02:25
Apps Script to update STEPN prices
function updateData(){
// var ss = SpreadsheetApp.getActiveSpreadsheet(),
var sheet = SpreadsheetApp.getActive().getSheetByName('GST')
let coins = [
'green-satoshi-token-bsc',
'green-satoshi-token',
'binancecoin',
'solana',
];
var prices = getCGSimplePrices(coins.join(','), 'usd')
@pahud
pahud / bootstrap.sh
Last active August 20, 2024 20:32
My AWS SSO setup script for Gitpod workspaces
# watch the demo at https://youtu.be/cGUNf1FMNvI
#
# customize these variables
#
DEFAULT_PROFILE='default'
DEFAULT_REGION='us-east-1'
DEFAULT_OUTPUT='json'
SSO_START_URL='https://your-sso.awsapps.com/start'
SSO_REGION='us-east-1'
SSO_ACCOUNT_ID='123456789012'
@pahud
pahud / bootstrap.sh
Last active September 27, 2024 14:27
AWS SSO + Codespaces
#!/bin/bash
# video demo - https://www.youtube.com/watch?v=Y8TyE_DNds8
mkdir ~/.tmp && cd $_
# install aws-cli v2
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \
unzip awscliv2.zip && \
sudo ./aws/install
@pahud
pahud / remote_docker_host_m1.md
Last active April 8, 2024 14:00
Remote Docker Host for M1 laptop
  1. Open a new Amazon Linux 2 EC2(amd64) on AWS. Make it spot instance if you prefer.

ssh ec2-user@<EC2_IP> into the EC2 instance:

# install and start docker
$ sudo yum install -y docker
$ sudo service docker start
@pahud
pahud / apprunner.cfn.yaml
Last active June 12, 2021 02:16
apprunner cfn service
Resources:
FlaskService3B7F72B9:
Type: AWS::AppRunner::Service
Properties:
SourceConfiguration:
CodeRepository:
CodeConfiguration:
ConfigurationSource: REPOSITORY
RepositoryUrl: https://github.com/aws-containers/hello-app-runner
SourceCodeVersion: