Skip to content

Instantly share code, notes, and snippets.

View NO-ob's full-sized avatar

NO_ob NO-ob

View GitHub Profile
@NO-ob
NO-ob / filenameIncrement.py
Created March 25, 2020 21:50
Increment 3 digit number in filename by 2
import os
import re
dir = os.getcwd()
for filename in os.listdir(dir):
match = re.search("\s\d{3}\s", filename)
if match:
num = int(match.group().strip(" ")) + 2
if num < 100:
num = "0" + str(num)
@NO-ob
NO-ob / gelbooruResize.user.js
Created June 24, 2020 18:11
GelbooruResize
// ==UserScript==
// @icon https://gelbooru.com/favicon.ico
// @name Gelbooru Resize
// @namespace kannalo
// @version 0.1
// @description try to take over the world!
// @author You
// @match *://gelbooru.com/index.php?page=post&s=view*
// @grant none
// ==UserScript==
// @name sanitizeNexus
// @icon https://www.nexusmods.com/favicon.ico
// @namespace http://tampermonkey.net/
// @version 1.1
// @description Removes unwanted trash from nexus mods
// @author kannalo
// @match https://www.nexusmods.com/*
// @grant none
// @run-at document-end
@NO-ob
NO-ob / hentaiCafeDL.user.js
Last active February 18, 2021 10:31
hentai.cafe dl script
// ==UserScript==
// @name Hentai.Cafe DL
// @namespace http://tampermonkey.net/
// @version 1.1
// @description try to take over the world!
// @author You
// @match https://hentai.cafe/hc.fyi/*
// @require https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.5/jszip.min.js
// @require https://cdnjs.cloudflare.com/ajax/libs/jszip-utils/0.0.2/jszip-utils.min.js
// @require https://cdnjs.cloudflare.com/ajax/libs/FileSaver.js/1.3.8/FileSaver.js
@NO-ob
NO-ob / cbrtocbz
Created March 12, 2021 09:11
Converts all cbr in current dir to cbz
#!/usr/bin/python
import sys, os
os.system("mkdir tmp")
for filename in os.listdir("."):
if filename.endswith(".cbr"):
workingdir = os.path.abspath(".")
os.system("unrar x '" + os.path.abspath(filename) + "' " + workingdir + "/tmp")
os.system("cd tmp && zip -r '../" + filename.split(".")[0]+"'.cbz *")
// ==UserScript==
// @name Pixiv Image fit
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Makes full image fit to screen
// @author NO_ob
// @match https://www.pixiv.net/en/artworks/*
// @icon https://www.google.com/s2/favicons?domain=pixiv.net
// @grant none
// ==/UserScript==
// ==UserScript==
// @name Pixiv Bookmark redirect
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Makes pixiv redirect to image page after editing bookmark
// @author NO_ob
// @match https://www.pixiv.net/bookmark_add.php*
// @grant none
// @run-at document-idle
// ==/UserScript==
@NO-ob
NO-ob / 5chImageInserter.user.js
Last active December 18, 2021 11:51
Embeds images on 2/5chan reader sites
// ==UserScript==
// @name 2ch/5ch Image Inserter
// @namespace https://gist.github.com/NO-ob/ed240ac8ccdb4a2775eb0857968c50e4/raw/5chImageInserter.user.js
// @downloadURL https://gist.github.com/NO-ob/ed240ac8ccdb4a2775eb0857968c50e4/raw/5chImageInserter.user.js
// @homepage https://gist.github.com/NO-ob/mangadex-scripts
// @version 0.5
// @description Embeds images on 2/5chan reader sites
// @author NO_ob
// @include */r/*/*/*
// @include */test/read.cgi/*/*
import discord
import requests
import subprocess
import re
import io
import json
from copy import deepcopy
from random import randint
## The bot needs persm to make messages, manage messages and manage webhook
## set the value at the botton to the bots token
@NO-ob
NO-ob / palemoonFanboxPadding.user.js
Created October 30, 2021 09:48
Adds padding to fanbox on palemoon as its broken
// ==UserScript==
// @name Fanbox padding for palemoon
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://www.fanbox.cc/
// @icon https://www.google.com/s2/favicons?domain=fanbox.cc
// @grant none
// ==/UserScript==