版本: 1.0
日期: 2026-02-06
状态: DRAFT — 待评审
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 filesystem | |
| import ( | |
| "io" | |
| "time" | |
| ) | |
| // Common Meta keys used across all plugins | |
| const ( | |
| MetaKeyPluginName = "plugin-name" // Plugin name that provides this file/directory |
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 main | |
| import ( | |
| "bufio" | |
| "bytes" | |
| "compress/gzip" | |
| "encoding/base64" | |
| "encoding/csv" | |
| "flag" | |
| "fmt" |
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 main | |
| import ( | |
| "fmt" | |
| "math" | |
| "math/rand" | |
| "os" | |
| "os/exec" | |
| "strconv" | |
| "strings" |
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 python3 | |
| # Usage: | |
| # ./poll.py --host <xxx.tidbcloud.com> --port 4000 --user <username> --password <pwd> | jq --unbuffered .text | grep http | |
| import signal | |
| import time | |
| import os | |
| import argparse | |
| import MySQLdb | |
| parser = argparse.ArgumentParser(description='polls db for new rows') |
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 bigetc | |
| import ( | |
| "database/sql" | |
| "time" | |
| "github.com/c4pt0r/log" | |
| _ "github.com/go-sql-driver/mysql" | |
| ) |
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 main | |
| import ( | |
| "database/sql" | |
| "fmt" | |
| "log" | |
| "math/rand" | |
| "time" | |
| "github.com/fatih/color" |
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
| 1. Open S3 service in AWS, create bucket and get the access point, like this: https://${bucket-name}.s3.us-west-2.amazonaws.com | |
| 2. Go to https://tidbcloud.com and register a new free TiDB instance (10G), get a MySQL endpoint, and make sure the traffic filter is properly configured to allow public access. | |
| 3. Install the juicefs client locally in Distributed Mode (https://juicefs.com/docs/community/getting-started/for_distributed) | |
| 4. initialize and mount FUSE according to the following two lines: | |
| # juicefs format --storage s3 \ | |
| --bucket https://${bucket-name}.s3.us-west-2.amazonaws.com \ | |
| --access-key ${aws-access-key} \ | |
| --secret-key ${aws-secret} \ | |
| mysql://${mysql-user}:${mysql-password}@\(your-cloud-tidb.prod.aws.tidbcloud.com:4000\)/juice \ |
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 python3 | |
| import time | |
| import slack | |
| import os | |
| import sqlite3 | |
| from requests_html import HTMLSession | |
| client = slack.WebClient(os.environ.get('SLACK_BOT_TOKEN')) | |
| session = HTMLSession() |
NewerOlder