Skip to content

Instantly share code, notes, and snippets.

View xqm32's full-sized avatar
🎯
Focusing

Qiming Xu xqm32

🎯
Focusing
  • Hefei University of Technology
  • Hefei, China
  • 23:43 (UTC +08:00)
View GitHub Profile
@xqm32
xqm32 / clash-config.yaml
Last active April 13, 2024 08:31
clash config with proxy-providers and rule-providers
##### 使用说明 #####
# 1. 请填写 proxy-providers - subscribe - url 为订阅链接
# 2. 下载 https://github.com/Loyalsoldier/clash-rules/archive/refs/heads/release.zip 并解压至 ./profiles/ruleset 文件夹下
# 3. 若需要自动更新 ruleset, 请编辑 rule-providers-config - type 为 http
##### 参考链接 #####
# 1. clash 样例配置文件
# https://lancellc.gitbook.io/clash/clash-config-file/an-example-configuration-file
# 2. clash 规则集
# https://github.com/Loyalsoldier/clash-rules
@xqm32
xqm32 / clash-yacd.yaml
Last active February 28, 2024 08:44
Docker Compose for Clash and YACD
services:
# See https://github.com/Dreamacro/clash/wiki/Running-Clash-as-a-service#docker
clash:
# ghcr.io/dreamacro/clash
# ghcr.io/dreamacro/clash-premium
# dreamacro/clash
# dreamacro/clash-premium
image: dreamacro/clash-premium
container_name: clash-premium
volumes:
@xqm32
xqm32 / flood-rtorrent.yaml
Last active March 17, 2024 22:24
Docker Compose for Flood.js and rTorrent
# See https://github.com/jesec/flood/discussions/120
# Access Flood and register a user with `/config/.local/share/rtorrent/rtorrent.sock` rTorrent socket path
services:
flood:
hostname: flood
image: jesec/flood:master
user: 0:0
restart: unless-stopped
command: --port 3001 --allowedpath /data
environment:
@xqm32
xqm32 / solver.py
Created December 13, 2022 09:46
Yet Another Solver
import matplotlib.pyplot as plt
import numpy as np
class Solution:
def __init__(
self,
a: float,
b: list[float],
c: list[float],
@xqm32
xqm32 / drcom.sh
Last active May 31, 2023 15:50
HFUT DrCOM
#!/bin/sh
username="YOUR_USERNAME"
password="YOUR_PASSWORD"
content=$(curl -s "http://172.16.200.11")
# if [ $(echo "${content}" | hexdump -e '"%_p"' | grep -m 1 -o "tologin") ]; then
# echo "tologin"
# curl -d "DDDDD=${username}&upass=${password}&0MKKey=123" -s "http://172.16.200.11" > /dev/null
if [ ! "${content}" ]; then
@xqm32
xqm32 / alist.yaml
Last active February 25, 2023 06:57
Docker Compose for AList
# See https://alist.nn.ci/guide/install/docker.html
# See the log output for the admin's info: `docker exec -it alist ./alist admin`
version: '3.3'
services:
alist:
restart: always
volumes:
- './config:/opt/alist/data'
- '/root/service/data:/data'
ports:
@xqm32
xqm32 / far.yaml
Created March 11, 2023 08:02
Flood, Alist and RTorrent Docker Compose File
services:
# See https://github.com/jesec/flood/discussions/120
# Access Flood and register a user with `/config/.local/share/rtorrent/rtorrent.sock` rTorrent socket path
flood:
hostname: flood
image: jesec/flood:master
user: 0:0
restart: unless-stopped
command: --port 3001 --allowedpath /data
environment:
@xqm32
xqm32 / wam.ahk
Last active July 17, 2023 13:26
Use macOS-style Keymap on Windows
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
; Reference https://medium.com/@chrisdhanaraj/mapping-your-macos-keybinds-to-windows-b6009c50065b
; Option Key Shortcuts
<!BS::Send {LCtrl Down}{BackSpace}{LCtrl Up}
<!Left::Send {LCtrl Down}{Left}{LCtrl Up}
@xqm32
xqm32 / lcmd.py
Last active August 20, 2023 05:24
LeetCode Markdown Committer
import datetime
import json
import os
import re
import subprocess
import sys
import textwrap
from typing import Self
@xqm32
xqm32 / gacha.rs
Last active November 15, 2023 05:05
use rand::{rngs::ThreadRng, Rng};
const U5C_W: [i32; 90] = [
60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60,
60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60,
60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60,
60, 660, 1260, 1860, 2460, 3060, 3660, 4260, 4860, 5460, 6060, 6660, 7260, 7860, 8460, 9060,
9660, 10260,
];
const U4C_W: [i32; 10] = [510, 510, 510, 510, 510, 510, 510, 510, 5610, 10710];