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 | |
r''' | |
socat tcp-listen:1,fork exec:./ddns-via-socat.py | |
# client: | |
{echo xxxx-password && sleep 9} | nc x.x.x.x 1 | |
''' | |
import sys | |
from datetime import datetime |
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
from datetime import datetime | |
# pip install fastapi uvicorn python-multipart | |
from fastapi import FastAPI, File, UploadFile | |
from fastapi.responses import PlainTextResponse | |
# pip install paddlepaddle paddleocr | |
# pip install opencv-python-headless | |
from paddleocr import PaddleOCR, draw_ocr |
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 | |
from uuid import uuid4 | |
from fastapi import FastAPI, Request | |
from fastapi.responses import RedirectResponse | |
from requests import Session | |
from furl import furl | |
app = FastAPI() |
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 | |
from datetime import datetime | |
from sys import argv, stderr | |
from threading import Thread, Lock | |
from time import sleep | |
lock = Lock() |
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 | |
from fastapi import FastAPI, Request | |
app = FastAPI() | |
@app.get("/x") | |
async def test(req: Request): | |
return str(req.base_url) |
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
--- | |
apiVersion: apps/v1 | |
kind: StatefulSet | |
metadata: | |
name: es | |
spec: | |
serviceName: elasticsearch | |
replicas: 8 | |
selector: | |
matchLabels: |
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 | |
from os import getenv | |
from json import dumps | |
from elasticsearch import Elasticsearch | |
from elasticsearch.helpers import scan | |
from starlette.applications import Starlette | |
from starlette.requests import Request |
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
export DNSPOD_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | |
export DNSPOD_HTTP_TIMEOUT=100000000 | |
CMD=run | |
CMD=renew | |
N=.lego/certificates/svc.cool | |
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
#!/bin/sh | |
nets="0.0.0.0/0" | |
nets="192.168.0.0/16 172.16.0.0/12 10.0.0.0/8" | |
while true; do | |
date | |
#sshuttle --dns -r hk $nets | |
#echo enable dns |
NewerOlder