Skip to content

Instantly share code, notes, and snippets.

View auxten's full-sized avatar
🛠️
Coding

Auxten Wang auxten

🛠️
Coding
View GitHub Profile
@auxten
auxten / alloc.cpp
Created June 1, 2023 07:56
aws s3 download pre allocate disk space
#include <iostream>
#include <fstream>
#include <fcntl.h>
#include <sys/stat.h>
#include <unistd.h>
#include <aws/core/Aws.h>
#include <aws/s3/S3Client.h>
#include <aws/s3/model/HeadObjectRequest.h>
#include <aws/s3/model/GetObjectRequest.h>
@auxten
auxten / cla.md
Last active December 5, 2023 06:21
chdb cla

chDB Individual Contributor License Agreement v1.0

Based on ClickHouse Individual Contributor License Agreement v1.0

Thank you for your interest in chDB (https://github.com/chdb-io/chdb). In order to clarify the intellectual property license granted with Contributions from any person or entity, the author of chDB, Github User Name:[auxten] (https://github.com/auxten) ("Author")must have a Contributor License Agreement ("CLA") on file that has been signed, accepted or otherwise agreed to by each contributor, indicating agreement to the license terms below.

You accept and agree to the following terms and conditions for Your previous, present and future Contributions submitted to the Author. Except for the license granted herein to the Author and recipients of software distributed by the Author, You reserve all right, title, and interest in and to Your Contributions.

  1. Definitions. "You" (or "Your") shall mean the undersigned person/entity, which is the copyright owner or legal entity authorized by the cop
@auxten
auxten / README.md
Last active January 17, 2024 15:18 — forked from cld4h/README.md
Bypass the GFW; clash fake-ip and tproxy; iptables and transparent proxy on Linux; 在Linux上通过 iptables 以及 clash 配置透明代理用于本机及局域网翻墙网关; Linux 翻墙路由器配置

This article show you the ultimate way to set up a transparent proxy on Linux using clash and iptables to bypass the GFW in China.

We use:

You can go to github gist to download all files mentioned in this article.

@auxten
auxten / got.go
Last active June 22, 2024 12:43
clone git repo and put it into ${GOPATH}/src/github.com/org/repo like go get -d
package main
import (
"fmt"
"os"
"os/exec"
"strings"
)
func main() {
@auxten
auxten / direct.yaml
Last active August 19, 2025 10:54
clash-rules
payload:
- DOMAIN-SUFFIX,tailscale.com
- DOMAIN-KEYWORD,quickconnect
- DOMAIN-SUFFIX,linrc.com
- DOMAIN-SUFFIX,ts.net
- PROCESS-NAME,tailscale
- PROCESS-NAME,tailscaled
- DOMAIN-KEYWORD,derp
- DOMAIN-KEYWORD,tailscale
- DOMAIN-SUFFIX,r2.cloudflarestorage.com
@auxten
auxten / export-parquet.py
Last active December 9, 2024 07:26
Export PostgreSQL table to 10 Parquet files with chDB in 15 lines
import chdb
# Get total rows
total_rows = int(chdb.query("""
SELECT COUNT(*)
FROM postgresql('192.168.3.135', 'sample_db', 'users', 'postgres', 'mysecretpassword')
""").bytes().strip())
# Calculate rows per file
rows_per_file = -(-total_rows // 10) # Ceiling division