Skip to content

Instantly share code, notes, and snippets.

@neckothy
neckothy / komgasse.py
Last active May 2, 2023 03:34
send Komga library updates to Discord
import json
import re
import requests
import sseclient
import threading
import time
# Komga server config
KOMGA_HOST = "https://example.com/komga"

Digital Manga Buyer's Guide

Notes

This guide is intended to help you decide where to purchase your digital manga depending on your needs.

It WILL focus on:

  • official English digital volumes
  • popular ebook platforms
  • DRM-free indie publishers & platforms
  • ease of acquiring a DRM-free copy
@neckothy
neckothy / pingo.json
Last active August 3, 2023 17:43
pingo Scoop manifest
{
"version": "latest",
"description": "experimental lossless and lossy image optimizer (PNG, JPEG, WebP, APNG) designed to be used for web context",
"homepage": "https://css-ig.net/pingo",
"license": "Freeware",
"url": "https://css-ig.net/bin/pingo-win64.zip",
"bin": "pingo.exe"
}
@neckothy
neckothy / jpegtran.json
Created August 3, 2023 17:43
jpegtran Scoop manifest
{
"version": "latest",
"description": "lossless transformation of JPEG files",
"homepage": "https://jpegclub.org/jpegtran/",
"license": "https://spdx.org/licenses/IJG.html",
"url": "https://jpegclub.org/jpegtran.exe",
"bin": "jpegtran.exe"
}
@neckothy
neckothy / bwcover.py
Created August 5, 2023 19:33
fetch and save full-size covers from bookwalker
#!/bin/python
import sys
import re
import requests
# https://github.com/qsniyg/maxurl/issues/17
# https://github.com/qsniyg/maxurl/commit/5d5a77c08f9461c5d7c4ceac209fca240b776d7b#diff-1bc842c9e7dda2f26048e68021e82a3c290fb38639d0acf259392b26f4664fc8R21594-R21613
def get_real_url(url):
if "rimg.bookwalker.jp" in url:
@neckothy
neckothy / avg_days_between.py
Created August 24, 2023 14:42
find average days between a list of dates
from datetime import date, timedelta
# dates to average (for example, mushoku tensei v01-24 digital release dates)
dates = [
(2019, 4, 4),
(2019, 5, 23),
(2019, 8, 1),
(2019, 10, 10),
(2020, 1, 16),
(2020, 4, 2),
@neckothy
neckothy / dnd_linux_patcher.py
Last active October 12, 2023 18:53
Update or install Dark and Darker easily on Linux again
#!/bin/python
import hashlib
import os
import requests
def get_patch_list():
patch = {}
with requests.get(
"http://cdn.darkanddarker.com/Dark%20and%20Darker/PatchFileList.txt"
@neckothy
neckothy / DoUrTaxes.user.js
Last active September 14, 2023 15:44
Include tax in OSRS Wiki Prices margin and profit calculations
// ==UserScript==
// @name Do Ur Taxes
// @namespace Violentmonkey Scripts
// @match https://prices.runescape.wiki/osrs*
// @grant GM_xmlhttpRequest
// @version 1.44
// @author neck
// @description Include tax in OSRS Wiki Prices margin and profit calculations
// @run-at document-start
// ==/UserScript==
@neckothy
neckothy / nyaafilter.user.js
Created September 17, 2023 06:33
simple text and regex filtering for results on nyaa.si
// ==UserScript==
// @name nyaa filter
// @namespace Violentmonkey Scripts
// @match https://nyaa.si/
// @grant none
// @version 1.01
// @author neck
// @description simple text and regex filtering for results on nyaa.si
// ==/UserScript==
// list of strings to filter (case sensitive)
@neckothy
neckothy / mgpk_hash.py
Created September 17, 2023 09:35
get valid x-mgpk-hash headers for requests to a certain terrible manga platform nobody should be supporting
# original PoC from sometime in May, should still work
# valid for both APIs (JP/US)
import hashlib
# returned on register, login, etc
HASH_KEY = ""
# my PoC, cleaned up by someone much smarter than me (ty boss)
def get_mgpk_hash(params):
sha_256 = hashlib.sha256()