Skip to content

Instantly share code, notes, and snippets.

View Sa1koro's full-sized avatar
👩‍💻
Exhausted

Huanrui Cao Sa1koro

👩‍💻
Exhausted
View GitHub Profile
@Sa1koro
Sa1koro / 115_Player_UI_HideDrawer.js
Created April 16, 2026 13:41
新版 115 播放页抽屉式关联文件隐藏
// ==UserScript==
// @name 115 播放页抽屉式关联文件 UI 增强
// @namespace https://local.115.ui.enhance/
// @version 0.2.0
// @description 将右侧关联文件改为覆盖式抽屉,保留官方播放器能力
// @match https://115.com/players/video/*
// @run-at document-idle
// @grant none
// ==/UserScript==
@Sa1koro
Sa1koro / elcass_h5p.js
Created November 4, 2025 19:59
Extract H5P Slide Links from eClass (PANF1900)
// ==UserScript==
// @name Extract H5P Slide Links from eClass
// @name:zh-CN eClass 提取 H5P 幻灯片链接
// @namespace LibertyBear Scripts
// @match https://eclass.yorku.ca/mod/h5pactivity/view.php?id=*
// @grant none
// @version 1.1
// @author -
// @description Extract H5P slide download links from eClass for PANF1900 Courses
// @description:zh-CN 提取eClass上的H5P幻灯片下载链接并自动复制按钮(PANF1900)
@Sa1koro
Sa1koro / add-extensions.sh
Last active November 26, 2025 22:19
du in powershell
for f in *; do [ -f "$f" ] && [[ ! "$f" =~ \.[^.]+$ ]] && echo "$f -> $f.$(file -b --mime-type "$f" | cut -d'/' -f2)"; done
#!/bin/bash
for f in *; do
if [ -f "$f" ] && [[ ! "$f" =~ \.[^.]+$ ]]; then
# Get the file type
mime=$(file -b --mime-type "$f")
# Map MIME types to extensions
case "$mime" in
@Sa1koro
Sa1koro / ip2location_lite_csv.js
Last active April 1, 2025 13:17
GeoIP for Synology Download Station
// 全局变量存储IP范围数据
let gIpRanges = [];
let gIsInitialized = false;
let gOriginalReload = null; // 存储原始reload函数
// 创建文件输入元素,允许用户选择IP2LOCATION CSV文件
function createFileInput() {
const fileInput = document.createElement('input');
fileInput.type = 'file';
fileInput.id = 'ip2location-csv';
@Sa1koro
Sa1koro / alist_export.js
Created March 30, 2025 01:44
Export AList file list
// Function to export data to CSV
function exportToCSV(data, filename) {
const csvContent = data.map(e => e.join(",")).join("\n");
const blob = new Blob([csvContent], { type: 'text/csv;charset=utf-8;' });
const link = document.createElement("a");
const url = URL.createObjectURL(blob);
link.setAttribute("href", url);
link.setAttribute("download", filename);
link.style.visibility = 'hidden';
document.body.appendChild(link);
@Sa1koro
Sa1koro / rednoteADBots_BoidFlocking.ipynb
Last active February 7, 2025 16:24
mesa_Boid-Flocking_rednoteAD-Bots
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Sa1koro
Sa1koro / RPS.c
Created July 13, 2023 12:35
ZyBook 16.13 LAB: Rock paper scissors
#include <stdlib.h>
#include <stdio.h>
int main() {
const int ROCK = 0;
const int PAPER = 1;
const int SCISSORS = 2;
int seed;
scanf("%d", &seed);