Skip to content

Instantly share code, notes, and snippets.

View TypeA2's full-sized avatar
🍡

TypeA2

🍡
View GitHub Profile
@TypeA2
TypeA2 / bookmarklet.js
Last active January 25, 2025 15:05
Profile URLs bookmarklet
/* Initial version: 2024-08-26
* Current version: 2024-09-15 (rev: 3)
*
* Changelog:
* Rev 1: fixed Twitter, Pixiv, add misskey
* Rev 2: firefox detection, fix bluesky
* Rev 3: fix Bluesky, limited Youtube support
*/
javascript:void(async () => {
var profile_url;
// ==UserScript==
// @name Easier 1up
// @namespace https://github.com/TypeA2/booru-scripts
// @match *://*.donmai.us/uploads/*
// @grant none
// @version 1.0.4
// @author TypeA2
// @description 2024-06-18 (initial), 2026-03-31 (current)
// @downloadURL https://github.com/TypeA2/booru-scripts/raw/refs/heads/master/Easier_1up.user.js
// @updateURL https://github.com/TypeA2/booru-scripts/raw/refs/heads/master/Easier_1up.user.js
@TypeA2
TypeA2 / pixel_hash.py
Last active August 17, 2026 07:33
Danbooru Pixel Hash
#!/usr/bin/env python3
from pyvips import Image
from tempfile import TemporaryFile
from pathlib import Path
from typing import cast
from zipfile import ZipFile
import hashlib
import sys
import json
@TypeA2
TypeA2 / TypoFixer.user.js
Last active September 23, 2024 05:53
Because I can't type, apparently.
// ==UserScript==
// @name TypoFixer
// @namespace Violentmonkey Scripts
// @match *://*.donmai.us/posts*
// @match *://*.donmai.us/uploads/*
// @grant none
// @version 1.0.28
// @author TypeA2
// @description 2024-05-02 (initial), 2024-09-23 (current)
// @downloadURL https://gist.github.com/TypeA2/2bd32138b4b9eb640e4eee1f48f584ee/raw/TypoFixer.user.js
@TypeA2
TypeA2 / bluesky_replacement.py
Created February 9, 2024 23:39
bluesky_replacement.py
#!/usr/bin/env python3
import os
import json
import re
import time
import hashlib
import mimetypes
import io
from PIL import Image
from pathlib import Path
@TypeA2
TypeA2 / twitter_embed_proxy_upload.user.js
Created October 8, 2023 10:24
Allows uploading by directly inputting the fxtwitter/vxtwitter link on the upload page.
// ==UserScript==
// @name fxtwitter/vxtwitter uploader - danbooru.donmai.us
// @namespace Violentmonkey Scripts
// @match https://*.donmai.us/uploads/new
// @grant none
// @version 1.0
// @author TypeA2
// @description 10/8/2023, 12:27:51 AM
// ==/UserScript==
@TypeA2
TypeA2 / copy-dtext.user.js
Last active September 18, 2024 01:49
Copy Tweet content as DText
// ==UserScript==
// @name Copy Tweet text as DText
// @namespace Violentmonkey Scripts
// @match *://twitter.com/*/status/*
// @match *://x.com/*/status/*
// @grant none
// @version 1.1
// @author TypeA2
// @description 7/3/2023, 2:22:48 PM
// @updateURL https://gist.github.com/TypeA2/7e9298641dec292a39cc83143e8a51f2/raw/copy-dtext.user.js
@TypeA2
TypeA2 / shorts_redirect.user.js
Last active July 3, 2023 12:49
Redirect YouTube shorts to their /watch equivalent
// ==UserScript==
// @name Redirect YouTube shorts to normal video pages
// @namespace http://tampermonkey.net/
// @version 1.0
// @author TypeA2
// @match https://*.youtube.com/shorts/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=youtube.com
// @grant none
// ==/UserScript==
@TypeA2
TypeA2 / theme.css
Created May 22, 2023 18:32
Custom dark Danbooru
.ai-tags-related-tags-column.hidden {
display: initial !important;
}
body.dark, body[data-current-user-theme="dark"] {
--grey-0: #f6f6f6;
--grey-1: #e8e8e8;
--grey-2: #d1d1d1;
--grey-3: #ababab;
--grey-4: #919191;
@TypeA2
TypeA2 / imgur_download.py
Last active May 15, 2023 23:41
Download imgur images with imgur's ajax format as a source
#!/usr/bin/env python3
import sys
import json
import asyncio
import aiohttp
from tqdm import tqdm
from itertools import islice
from pathlib import Path
PARALLEL = 12