Skip to content

Instantly share code, notes, and snippets.

View IamMusavaRibica's full-sized avatar
😀

Darac IamMusavaRibica

😀
  • Zagreb, Croatia
View GitHub Profile

Hytale ECS

Hytale server uses a pattern called Entity Component System (ECS). This is very different from standard Object-Oriented Programming (OOP). In standard OOP, you might have a Player class that extends Entity. In ECS, a "Player" isn't a single class; it's just an ID that has a bag of data attached to it.

Ref

A Ref (short for reference) is a safe, persistent handle pointing to a specific entity within a Store. While the Store uses integer IDs internally to manage data efficiently, these IDs can change as entities are moved in memory. A Ref abstracts this away and acts as a stable pointer that tracks the entity's validity and current location. It's the primary key for interaction, whenever you need to read or write specific data such as health or position, you must pass the corresponding Ref to the Store.

You will frequently see Refs typed as Ref or Ref. This generic type parameter defines the context of that reference, instead of the type of content as you may e

@IamMusavaRibica
IamMusavaRibica / writeup.md
Last active May 13, 2024 14:47
Unfair Camera Wire - TBTL CTF 2024 writeup

TBTL CTF 2024 - Unfair Camera Wire writeup

This challenge was given on TBTL CTF 2024. It was put into the 'Misc' category.

We were the only team that solve this challenge. I have to admit, it was exhausting, and I spent more time looking for the right tools than actually figuring out how to solve it. So, what's going on?

@IamMusavaRibica
IamMusavaRibica / ednevnik.py
Last active November 23, 2024 18:29
eDnotifier source
import aiohttp
import asyncio
from collections import namedtuple
from typing import Optional, Any, Union, Callable
import lxml.etree
from lxml.etree import HTML
from datetime import date
from dataclasses import dataclass

Message components

This gist shows you how to use message components in discord.py 2.0

This assumes that you know how Object Orientated Programming in Python works, if you don't know what this is then I recommend that you read this guide.

Installing

You'll need to install pycord/discord.py from git to use this (if you don't have git then google how to install it for your OS, I can't be bothered to put it in here...), if you already have this then you can skip to the next section. However if you don't please read the below