Skip to content

Instantly share code, notes, and snippets.

@ZipFile
ZipFile / README.md
Last active April 11, 2026 09:49
Pixiv OAuth Flow

Retrieving Auth Token

  1. Run the command:

    python pixiv_auth.py login

    This will open the browser with Pixiv login page.

@ZipFile
ZipFile / README.md
Last active March 18, 2026 17:21
MGS Portable Ops stamina fine-tuning (CwCheat)

MGS PO is notorious for its stamina drain rates. But luckily, there are few parameters we can tinker with via cheats.

In-game, stamina reduction happens:

  • On actions (jump, cqc, etc...)
  • Every second when walking, running, crawling, hanging from ledges or dragging bodies

Reduction coefficients are stored at 0x08AFB02C (0x202fb02c in CwCheat notation). In ULUS10202.ini under Hunger Fine-Tuning section are coefficients I was able to find/map with their defaults. Remove lines you do not need to override and adjust the rest.

Experiment!

@ZipFile
ZipFile / NPJH50045.ini
Last active March 11, 2026 08:57
Disable camera shake/wobble in MGS Peace Walker (CwCheat)
_S NPJH-50045
_G Metal Gear Solid - Peace Walker [JPN]
_C0 No Camera Wobble
_L 0x20147f78 0x00000000
@ZipFile
ZipFile / python-repr-print.c
Created March 4, 2026 13:26
Python's `print(repr(obj))`, but in C
#include <stdio.h>
#include <Python.h>
static void reprint(PyObject *obj) {
PyObject* repr = PyObject_Repr(obj);
PyObject* str = PyUnicode_AsEncodedString(repr, "utf-8", "~E~");
const char *bytes = PyBytes_AsString(str);
printf("REPR: %s\n", bytes);
@ZipFile
ZipFile / conftest.py
Created February 5, 2025 11:12
python-dependency-injection + pytest + sqlalchemy
# pip install dependency-injector pytest pytest-asyncio pytest-postgresql SQLAlchemy pydantic-settings asyncpg psycopg[binary]
import os
from contextlib import ExitStack
from typing import Any, AsyncIterator, Iterator, NoReturn
import pytest_asyncio
from dependency_injector.providers import Provider
from pytest import fixture
from pytest_postgresql.janitor import DatabaseJanitor
@ZipFile
ZipFile / WeightPaintSelectArmature.py
Last active May 1, 2024 13:25
[Blender Add-on] Switch to Weight Paint and select Armature
# This is free and unencumbered software released into the public domain.
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled
# binary, for any purpose, commercial or non-commercial, and by any
# means.
# In jurisdictions that recognize copyright laws, the author or authors
# of this software dedicate any and all copyright interest in the
# software to the public domain. We make this dedication for the benefit
@ZipFile
ZipFile / symlink-models.ps1
Created July 29, 2023 10:57
Link AUTOMATIC1111/stable-diffusion-webui models to ComfyUI
@ZipFile
ZipFile / Pixiv App API.yaml
Last active April 28, 2023 01:31
Unofficial API specification extracted from Pixiv Android App
swagger: '2.0'
info:
title: "Pixiv App API"
description: "Unofficial API specification extracted from Pixiv Android App v5.0.17"
version: "1.0"
host: app-api.pixiv.net
schemes:
- https
@ZipFile
ZipFile / Pixiv Public API.yaml
Last active August 7, 2022 14:11
Unofficial API specification extracted from Pixiv Android App
swagger: "2.0"
info:
title: "Pixiv Public API"
description: "Unofficial API specification extracted from Pixiv Android App v4.8.2"
version: "1.0"
host: public-api.secure.pixiv.net
schemes:
- https
basePath: /v1
produces:
@ZipFile
ZipFile / README.md
Last active May 16, 2022 21:23
DIY stream testing