Skip to content

Instantly share code, notes, and snippets.

View noaione's full-sized avatar
🥐
ゆび!ゆび!

noaione

🥐
ゆび!ゆび!
View GitHub Profile
@noaione
noaione / archive.sh
Last active March 4, 2024 23:15
wrap yt-dlp best quality download thingamagic so i can save vtuber stream agane in best quality
#!/bin/bash
yt-dlp --cookies ../cookies.txt -f "bestvideo[ext=mp4]+bestaudio[ext=webm]/bestvideo+bestaudio/best" -o "[%(upload_date)s] %(title)s.%(ext)s" --merge-output-format mkv $1
@noaione
noaione / 0001-Rework-gacha-system-and-make-it-customizable.patch
Last active February 4, 2024 02:56
a patch for a custom server for certain turn-based rpg that kinda fix the pity system and make it customizable | head: bac849d72a282145109ab1bbd2e46b5261fe9315
From 4ef0a621d7b4aa91e81b254435ec1911eaf8e52c Mon Sep 17 00:00:00 2001
From: noaione <noaione0809@gmail.com>
Date: Wed, 3 Jan 2024 15:49:59 +0700
Subject: [PATCH] Rework gacha system and make it customizable
I would like someone smart enough with math to do the actual calculation
and re-rework the gacha system again :)
diff --git a/src/main/java/emu/lunarcore/Config.java b/src/main/java/emu/lunarcore/Config.java
index 48a5da5..c5c5f76 100644
@noaione
noaione / unpatreon.js
Last active December 2, 2023 03:59
patreon -> kemono
function unpatreon() {
const KEMONO_DOMAIN = "https://kemono.su";
const url = new URL(window.location);
if (!url.hostname.includes("patreon.com")) {
alert("This scriptlet only works on patreon.com");
return;
}
// get id from URL path
@noaione
noaione / meta-fetch.user.js
Created December 1, 2023 16:08
Script to quickly get metadata from the HTML
// ==UserScript==
// @name Anchira - Meta Fetch
// @namespace anchira-meta-fetcher
// @match https://anchira.to/*
// @grant none
// @version 1.1.0
// @author noaione
// @description Quick script to add button to scrape the metadata
// ==/UserScript==
@noaione
noaione / repack_epub.py
Created November 28, 2023 10:36
quick and dirty script to repair epub that is not properly tagged as EPUB mimetype
# Quick script to repair broken epub
# Need libmagic and python-magic to work
# Use case:
import argparse
import sys
from pathlib import Path
from typing import List
from zipfile import ZIP_DEFLATED, ZIP_STORED, ZipFile
@noaione
noaione / ototoy-zero-volume.user.js
Created November 26, 2023 10:01
OTOTOY - No Volume Playback | Ensure that you don't get ear-raped when you open an album page and the trial song start blasting.
// ==UserScript==
// @name OTOTOY - No Volume Playback
// @namespace n4o-ototoy-script
// @match https://ototoy.jp/_/default/p/*
// @grant none
// @version 1.0
// @author N4O
// @description Ensure that you don't get ear-raped when you open an album page and the trial song start blasting.
// ==/UserScript==
Upscaling stuff with 4x digimanga v2
Downscale back to a reasonable resolution with ImageMagick Catmul filter (less blurry, almost no halo)
Command: magick mogrify -format png -alpha off -colorspace Gray -level 0.2%,100% -filter Catrom -resize xXXXX -monitor -path ./output/ ./input/*.png
Alpha off and colorspace Gray to force grayscale, level to 0.2% black since black level are not really #000000 sometimes.
// Some code related to handle tk generation made in Rust by a Rust-newb
// please spare me
fn generate_tk(full_text: &str, ctkk_data: &str) -> String {
let ctkk_split = ctkk_data.split('.').collect::<Vec<&str>>();
let ctkk_pre = ctkk_split[0].parse::<i64>().unwrap_or(0);
let ctkk_post = ctkk_split[1].parse::<i64>().unwrap_or(0);
let mut data = vec![];
@noaione
noaione / anchira_lrr.py
Created November 1, 2023 11:31
LANraragi / Anchira.to ingestion system | Ingest torrent folder into your LANraragi content directory
# Achira.to rip of FAKKU/Irodori/2D/etc.
import sys
import traceback
from pathlib import Path
from typing import TypedDict
from zipfile import ZipFile
from msgspec import Struct, ValidationError, field, yaml
@noaione
noaione / amznCover.bookmarklet.js
Created September 22, 2023 01:41
books storefront cover ripping scriplet as a browser bookmark. Most of the time it open a new tab because I'm retarded.
javascript:void%20function(){function%20t(t,n){const%20e=t%20instanceof%20Blob,r=e%3FURL.createObjectURL(t):t,o=document.createElement(%22a%22);o.href=r,o.download=n,o.target=%22_blank%22,o.rel=%22noopener%20noreferrer%22,o.dispatchEvent(new%20MouseEvent(%22click%22)),e%26%26URL.revokeObjectURL(r)}var%20n=Uint8Array,e=Uint16Array,r=Uint32Array,o=new%20n([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new%20n([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),a=function(t,n){for(var%20o=new%20e(31),i=0;i%3C31;++i)o[i]=n+=1%3C%3Ct[i-1];var%20a=new%20r(o[30]);for(i=1;i%3C30;++i)for(var%20c=o[i];c%3Co[i+1];++c)a[c]=c-o[i]%3C%3C5|i;return[o,a]},c=a(o,2),l=c[0],s=c[1];l[28]=258,s[258]=28,a(i,0);for(var%20h=new%20e(32768),f=0;f%3C32768;++f){var%20u=(43690%26f)%3E%3E%3E1|(21845%26f)%3C%3C1;u=(61680%26(u=(52428%26u)%3E%3E%3E2|(13107%26u)%3C%3C2))%3E%3E%3E4|(3855%26u)%3C%3C4,h[f]=((65280%26u)%3E%3E%3E8|(255%26u)%3C%3C8)%3E%3E%3E1}var%20d=new%20n(288);for(f=0;f%3C144;++f)d[f]