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 / 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
@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)