Skip to content

Instantly share code, notes, and snippets.

View Starrah's full-sized avatar

Starrah

View GitHub Profile
@Starrah
Starrah / aa-oh-my-caddy
Last active March 6, 2025 06:36
Caddyfile实用技巧
各种Caddyfile实用技巧
目录:
- basic_auth
- cert_by_dns
- cors常用宏
- file_server
- hsts
- http和https共用一个端口
- redir
- reverse_proxy HTTPS
@Starrah
Starrah / bluetooth-share-dualboot_setLinuxBluetoothConfigFromWindowsRegistry.xsh
Created May 28, 2024 18:01
Double pair bluetooth devices, share the same pairing key, in dual boot system(Windows and Linux) 在双系统(Windows和Linux)电脑上,双重配对蓝牙设备,共享蓝牙配对密钥 (Xonsh script; Tested on Windows 11 & Ubuntu 22.04)
#!/usr/bin/env xonsh
$RAISE_SUBPROC_ERROR = True
import sys
regFile = sys.argv[1] # only one argument:'.reg' file exported from Windows 'regedit'
# Reference: https://superuser.com/questions/229930/finding-bluetooth-link-key-in-windows-7-to-double-pair-a-device-on-dualboot-com
# Reference: https://tsukkomi.org/post/pairing-bluetooth-device-through-multiple-system
# 1. Pairing the blutooth device in both OS.
# 2. Export Windows registry item with 'regedit', from 'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BTHPORT\Parameters\Keys\xxxxxxxxxxxx'. See the references above.
@Starrah
Starrah / example.py
Created March 31, 2022 08:04
Open3D 可视化 (car_demo2版本)
import sys
import time
import traceback
# from multiprocessing import Queue, Process
from queue import Empty, Queue
from threading import Thread
import numpy as np
import open3d as o3d
@Starrah
Starrah / docker-compose.yml
Created February 24, 2022 13:39
复现walinejs / waline的[Bug]: MongoDB,当不使用Replica Set时,连接立即失败,并且服务器循环连接造成极高CPU占用
version: '3'
services:
waline:
container_name: waline
image: lizheming/waline:latest
restart: always
ports:
- 127.0.0.1:8360:8360
volumes: