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 / hxsl-cheatsheet.md
Last active March 28, 2025 05: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
@Yanrishatum
Yanrishatum / hmdspec.md
Created June 10, 2020 05:20
HMD Community Specification

HMD Community Spec

HMD format is not really complicated and separated into two primary areas: header and binary data. Later contains raw buffer data contents of which dependant on context. Spec is rather messy, but at least provides info on how format is structured.

Basic types

// ValueSize represents the value type used to write
// For example `Byte` would mean that to read the size you need to read single byte.
// Note regarding Floats: In Header section if value is 0, make sure it's not -0 and always +0.
@Yanrishatum
Yanrishatum / expavol.user.js
Created June 2, 2020 21:27
Exponential volume slider for youtube
// ==UserScript==
// @name Expavol
// @namespace http://yanrishatum.ru/
// @version 0.1
// @description Exponential volume for youtube. Because fuck linear volume. Barbarians.
// @author Yanrishatum
// @match https://*.youtube.com/*
// @match https://youtube.com/*
// @match https://youtu.be/*
// @grant none
@Yanrishatum
Yanrishatum / heapsfaq.md
Last active November 29, 2024 04:19
An Unofficial Heaps FAQ

An Unofficial Heaps FAQ

I (Yanrishatum) see too many same questions. They irritate me.

Translation

"How dare you come into this chat and not realize that i am the GOD of heaps and that you MUST check out MY documentation1!!! Im veyr abngrey!!!" - translation from someone in chat.

Very accurate, I highly approve.

@Yanrishatum
Yanrishatum / hlc.md
Last active May 5, 2025 12:37
How to compile HL/C

How to compile HL/C

Prepwork/terms

Because I have no trust in people.

  • <hashlink> points to your installation of Hashlink, e.g. folder in which hl.exe (or Unix executable) is, alongside with library binaries (.hdll files), and include folder.
  • <src> points to the folder containing generated HL/C sources. One that contains hlc.json file.
  • <app> refers to your output executable name, including extension.
  • <main> refers to your entry-point file name, including extension (see below).
  • I provide example of doing it on Windows via MSVC cl.exe, but Unix should be more or less same with replacement of argument flags and compiler.
  • I expect that you DO have a compiler installed and can call cl.exe or other compiler from command-line.
@Yanrishatum
Yanrishatum / mangastr.user.js
Last active April 17, 2019 11:32
Mangastr: A mangadex QOL stuff
// ==UserScript==
// @name Mangastr
// @namespace https://yanrishatum.ru/
// @version 1.0
// @description QOL For Mangadex
// @author Yanrishatum
// @match https://mangadex.org/follows
// @grant GM_setValue
// @grant GM_getValue
// ==/UserScript==
@Yanrishatum
Yanrishatum / Animation.hx
Created October 30, 2018 08:56
Advanced Animation for Heaps.
package h2d;
/**
Single Animation Frame. Can be reused multiple times in Animation.
**/
class AnimationFrame {
/**
An `h2d.Tile` this frame should display. Can be null to show nothing.
**/
@Yanrishatum
Yanrishatum / darktv.user.css
Last active September 27, 2019 04:59
Decent Twitch looks
/* ==UserStyle==
@name Dark.tv
@description Makes Twitch look decent. Replaces purple overtones with orange/grey ones.
@namespace CheerySoup
@author Yanrishatum
@version 1.1.0
@license mit
@advanced dropdown squares "Border corners" {
yes "Square" <<<EOT
--border-radius-large: 0px;
@Yanrishatum
Yanrishatum / S2DPlane.hx
Created October 16, 2018 10:38
s2d -> s3d plane renderer.
package h3d.scene;
import hxd.FloatBuffer;
import h3d.col.Bounds;
import h3d.prim.Primitive;
import h3d.Buffer;
import h3d.scene.RenderContext;
import h3d.mat.Material;
import h3d.mat.Data;
import h3d.scene.Mesh;
@Yanrishatum
Yanrishatum / SpriteToSheet.jsx
Created September 22, 2018 23:45
Sprite2Sheet script
// This script exports animated sprite into a spritesheet to a document copy.
// Made by: Yanrishatum <[email protected]> | http://yanrishatum.ru
// Script version: 1.1.0
// 08.02.2016: Initial release.
// 10.02.2016: Added options.
//
// License info:
// This is free and unencumbered software released into the public domain.
//
// Anyone is free to copy, modify, publish, use, compile, sell, or