Skip to content

Instantly share code, notes, and snippets.

View Yanrishatum's full-sized avatar
💭
Set your status

Pavel Alexandrov Yanrishatum

💭
Set your status
  • Russian Federation Sarov
View GitHub Profile
@Yanrishatum
Yanrishatum / yt-subscriptions-fix.user.css
Created August 1, 2024 02:19
Fix YT shit-tier subscriptions page
/* ==UserStyle==
@name Fix YT shit UX (again)
@namespace github.com/openstyles/stylus
@version 1.1.0
@description A new userstyle
@author Me
@var number ipr "Items per row" 6
@var number avatarSize "Avatar size" [30, "px"]
@var select hideButtons "Hide video buttons" {
yes: "none",
@Yanrishatum
Yanrishatum / heaps-pin-megathread.md
Last active August 27, 2024 13:42
#Heaps pin megathread

Heaps discord pin megathread

This is a compiled and categorized list of the #Heaps channel in Haxe discord because we ran out of pins and searching them is a massive pain.

The Source links point to specific messages from Discord for more context/original text. If it has an asterisk (I.e. Source*) that means text was altered to update with current state of the engine as of writing (January 2024) or omitted, and source link may provide more context.

Warning: As of writing this (January 2024), this list is still very WIP but usable.

TODO:

  • Sort and categorize remaining posts
@Yanrishatum
Yanrishatum / fix_yt_subscriptions.user.css
Last active September 6, 2023 22:54
New YT subscriptions page is shit, gotta fix it.
/* ==UserStyle==
@name Fix YT shit UX (again)
@namespace github.com/openstyles/stylus
@version 1.1.0
@description A new userstyle
@author Me
@var number ipr "Items per row" 6
@var number avatarSize "Avatar size" [30, "px"]
@var select hideButtons "Hide video buttons" {
yes: "none",
@Yanrishatum
Yanrishatum / update.ts
Created April 28, 2023 10:57
Peacock update script
// Requires Deno runtime, because Node is trash
// Install:
// 1. Put update.ts into peacock directory.
// 2. Create an empty version.txt file (IMPORTANT).
// Usage:
// 1. Turn off server/patcher (duh)
// 2. Run `deno run -A update.ts`
// How it works:
@Yanrishatum
Yanrishatum / unstrusted_log.user.js
Last active January 31, 2023 20:44
Unstrusted LOGgy: UX tweaks for reading dem circus
// ==UserScript==
// @name Untrusted LOGgy
// @namespace https://yanrishatum.ru
// @version 1.1-99
// @description Improve log reading experience for Untrusted
// @author Yanrishatum
// @match *://*.playuntrusted.com/opsec/*
// @match *://www.playuntrusted.com/manual/skills/
// @grant GM_xmlhttpRequest
// @grant GM.xmlHttpRequest
@Yanrishatum
Yanrishatum / expavol.user.js
Created October 8, 2022 10:37
Youtube better volume slider
// ==UserScript==
// @name Expavol
// @namespace http://yanrishatum.ru/
// @version 0.2
// @description Exponential volume for youtube. Because fuck linear volume. Barbarians.
// @author Yanrishatum
// @match https://*.youtube.com/*
// @match https://youtube.com/*
// @match https://youtu.be/*
// @match https://music.youtube.com/*
@Yanrishatum
Yanrishatum / syosetu_tts.user.js
Created April 24, 2022 17:21
Syosetu: TTS auto-reader
// ==UserScript==
// @name Syosetu TTS capabilities
// @namespace http://tampermonkey.net/
// @version 0.1
// @description I'm too lazy to read! Do it for me!
// @author Yanrishatum
// @match https://ncode.syosetu.com/n*/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=syosetu.com
// @grant unsafeWindow
// @run-at document-idle
@Yanrishatum
Yanrishatum / luts.md
Last active September 25, 2023 04:56
Cheap pixel-art color swap based on LUTs: An article

Cheap pixel-art color swaps based on LUTs: why, how and alternatives.

Why

Pixel-art is a palette-limited image that uses strictly specific colors, and those colors can be easily swapped in the editor. But what about doing it at runtime without a need to re-edit them? For example on sprites to make them appear belonging to a specific team. That technology was used for a long time, but with modern pixel-art games using PNGs, it became harder to do so, since those are not indexed colors.

Working with various people I've seen that it's often done in an inefficient way of just preparing copy of exact same sprite just to change the colors, or make limited version of palette swap by recoloring only a specific color (like magenta) at runtime. But what if we could just use a simple lookup table and swap any color we want during the rendering for a fairly cheap price? That is the why this a thing now.

How

Let's start what we have. Usually people use 8-bit images, meaning that there's 8 bits per the primary c

@Yanrishatum
Yanrishatum / TweakSaver.hx
Created April 13, 2021 08:29
Macro-powered tweak handler
package core.macro;
import haxe.macro.Context;
using haxe.macro.Tools;
class TweakSaver {
public static macro function load() {
var res = [];
@Yanrishatum
Yanrishatum / hxsl-cheatsheet.md
Last active October 11, 2024 15:31
HXSL cheat-sheet

HXSL cheat-sheet

This is a WIP of a cheat-sheet that I will finish Eventually™

Types

Mapping of the shader types to Heaps types:

Float = Float
Int = Int
Bool = Bool