Skip to content

Instantly share code, notes, and snippets.

View aimerneige's full-sized avatar
🎯
Keep Coding

Aimer Neige aimerneige

🎯
Keep Coding
View GitHub Profile
@aimerneige
aimerneige / docker-compose.yaml
Last active November 12, 2024 17:49
Napcat Multi-Account
services:
napcat-yukichan:
image: mlikiowa/napcat-docker:latest
container_name: napcat_yukichan
network_mode: bridge
restart: unless-stopped
environment:
- ACCOUNT=<yukichan-bot-qq>
- WS_ENABLE=true
ports:
@aimerneige
aimerneige / README.md
Last active August 17, 2024 22:32
Minecraft Auto TP / auto load your minecraft map with tp command

Minecraft Auto TP

How to use

  1. Make sure your are the administration of the minecraft server.
  2. Make sure your minecraft server runs under a tmux session.
  3. Make sure your minecraft has map mod installed.
  4. Start your server and login on your client.
  5. Change your gamemode to spectator (or creative) mode.
  6. Change PLAYER_NAME with your player name.
alias aget="aria2c -c -s 16 -x 16 -k 1M -j 16"
@aimerneige
aimerneige / lichess_pgn_parse.py
Created October 1, 2023 07:24
Parse lichess link and get pgn
import re
import io
import chess.pgn
import requests
url = "https://lichess.org/onwfe9NcyG6W"
response = requests.get(url)
html = response.text
pgn_string = re.findall(r'<div class="pgn">(.*?)</div>', html, re.S)[0]
# print(game_pgn)
@aimerneige
aimerneige / speedup_video.py
Last active October 8, 2023 06:11
Speed Up Video 2x faster
import os
from os import listdir
from os.path import isfile, join
current_dir = os.getcwd()
output_dir = os.path.join(current_dir, "out")
try:
os.makedirs(output_dir)
except:
pass
@aimerneige
aimerneige / baidu_ocr.py
Created May 2, 2023 14:25
baidu ocr pyqt
#!/usr/env/bin python3
# -*- coding: utf-8 -*-
# 读取系统文件用
import sys
# base64 编码
import base64
# 网络请求库
import requests
# 枚举类型
@aimerneige
aimerneige / sql2json.py
Last active April 25, 2023 09:59
read database and query all data into json
import os
import mysql.connector
# edit this to your database
mydb = mysql.connector.connect(
host="localhost",
user="root",
password="example",
database="example",
)
@aimerneige
aimerneige / pgn2video.py
Last active April 1, 2023 17:28
conver your pgn to a video (suitable for phoe)
#!/usr/env/bin python3
# -*- coding: utf-8 -*-
import os
import chess
import chess.pgn
import chess.svg
PGN_FILE_PATH = "./sample.pgn"
version: '3'
services:
mysql:
image: mysql:latest
container_name: dev_mysql
restart: always
ports:
- "3306:3306"
volumes:
@aimerneige
aimerneige / gorm-json-example.go
Created March 26, 2023 11:15
Gorm datatypes.JSON Example Code
package main
import (
"encoding/json"
"fmt"
"gorm.io/datatypes"
"gorm.io/driver/sqlite"
"gorm.io/gorm"
)