Skip to content

Instantly share code, notes, and snippets.

View k1pfel's full-sized avatar
🐟

Rin k1pfel

🐟
  • /bin/cat
View GitHub Profile
@k1pfel
k1pfel / MisakaF_Reverse_Proxy.md
Created July 11, 2025 06:59 — forked from hecheng337/MisakaF_Reverse_Proxy.md
反向代理 MisakaF 公费服 (Nginx)

如果你之前已经设置好了反向代理服务器:

1.将原来的 location / {} 复制一份,粘贴到下面;
2.在原来的 location 块中加入一行:
proxy_redirect https://MisakaF视频推流地址/ https://你服务器的地址/;
3.在复制的 location 块中,将 location / 改成 location /p/,将 proxy_pass 的目标地址改成 视频推流地址 /p/

完整的 Nginx 配置示范:

map $http_upgrade $connection_upgrade {
@k1pfel
k1pfel / README.md
Created April 22, 2025 07:38 — forked from roachhd/README.md
Basics of BrainFuck

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

BrainFuck Programming Tutorial by: Katie

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

INTRODUCTION

import requests
import json
from tqdm import tqdm
from concurrent.futures import ThreadPoolExecutor, as_completed
url = "https://api.wikimedia.org/service/lw/inference/v1/models/revertrisk-language-agnostic:predict"
headers = {
'Content-Type': 'application/json',
}
INTERVAL = 100000
import os
import sys
from multiprocessing.pool import ThreadPool as Pool
import mwclient
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from conf import botpassword_self as bps
pool_size = 32
url = "zh.wikipedia.org"
@k1pfel
k1pfel / dynamic_nat
Created July 13, 2024 05:56
mikrotik
:global addold
:global addnew
:set addnew [/interface get [/interface find name="pppoe-cu"] running]
:if ($addnew=true) do={
:set addold [/ip address get [/ip address find dynamic=yes interface="pppoe-cu"] address]
:set addold [:pick $addold 0 ([:len $addold ] -3)]
/ip firewall nat set [/ip firewall nat find comment="nat"] dst-address=$addold
}
import java.io.File;
import java.math.BigInteger;
import java.util.*;
public class FilterVariants {
public static void main(String[] args) {
File file = new File("Unihan_Variants.txt");
Scanner scanner = null;
try {
scanner = new Scanner(file);
#!/bin/env bash
# Run this script everytime when modified the dashboard
# https://juejin.cn/post/7182369883462729783
url1=http://localhost:3000
url2=http://localhost:9090
key=[redacted]
mimirtool analyze grafana --address=$url1 --key=$key
mimirtool analyze prometheus --address=$url2 --grafana-metrics-file="metrics-in-grafana.json"

Keybase proof

I hereby claim:

  • I am libkoi on github.
  • I am satorik (https://keybase.io/satorik) on keybase.
  • I have a public key whose fingerprint is AB51 FAC6 8C6D 9256 13C1 2086 E875 B15E EAF9 7E8F

To claim this, I am signing this object:

@k1pfel
k1pfel / signbot.py
Last active February 7, 2022 00:58 — forked from zhuyifei1999/signbot.py
Commons Signbot code
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# DUAL LICENSED: You are free to choose either or both of below licenses:
#
# 1.
#
# Published by zhuyifei1999 (https://wikitech.wikimedia.org/wiki/User:Zhuyifei1999)
# under the terms of Creative Commons Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
# https://creativecommons.org/licenses/by-sa/3.0/