Skip to content

Instantly share code, notes, and snippets.

View BennyThink's full-sized avatar
🌚
What's happening?

Benny BennyThink

🌚
What's happening?
View GitHub Profile
@BennyThink
BennyThink / azure-openai-proxy.py
Created March 16, 2025 10:39
convert azure openai to openai in python
#!/usr/bin/env python3
# coding: utf-8
import os
from sanic import Sanic, json as json_response, raw
from sanic.request import Request
import httpx
client = httpx.AsyncClient(
http2=True,
@BennyThink
BennyThink / xlsx.py
Created December 6, 2024 10:25
xlsx merge
# coding: utf-8
# tools - xls.py
# 2018/9/13
# package required: openpyxl xlrd xlwt xlutils
__author__ = 'Benny <benny.think@gmail.com>'
import itertools
import string
import re
@BennyThink
BennyThink / pages.sh
Created August 17, 2024 16:22
build telegram-tt on Cloudflare Pages
#!/bin/bash
cat << EOF >> .env
NODE_ENV=production
TELEGRAM_API_ID=$TELEGRAM_API_ID
TELEGRAM_API_HASH=$TELEGRAM_API_HASH
BASE_URL=$BASE_URL
EOF
npm run build:production
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Payment status</title>
</head>
<body>
Your payment is {{redirect_status}}.
@BennyThink
BennyThink / README.md
Created March 9, 2022 12:00 — forked from unixfox/README.md
Install alpine linux on Scaleway stardust
  1. Reboot into the rescue image
  2. Then execute these commands:
mkdir alpine
cd alpine
wget https://dl-cdn.alpinelinux.org/alpine/v3.13/releases/x86_64/alpine-minirootfs-3.13.1-x86_64.tar.gz
tar xzvf alpine*
mount -t proc /proc proc/
mount -t sysfs /sys sys/
mount --rbind /dev dev/
#!/bin/sh
# cross & static compile shadowsocks-libev
PCRE_VER=8.41
PCRE_FILE="http://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-$PCRE_VER.tar.gz"
MBEDTLS_VER=2.6.0
MBEDTLS_FILE="https://tls.mbed.org/download/mbedtls-$MBEDTLS_VER-gpl.tgz"