Skip to content

Instantly share code, notes, and snippets.

View TheVeryStarlk's full-sized avatar

Starlk TheVeryStarlk

View GitHub Profile
@TheVeryStarlk
TheVeryStarlk / ArabicShaper.cs
Last active April 20, 2025 19:10
Shape Separated Arabic Letters
using System.Collections.Frozen;
using System.Text;
const string original = "سماء عماد لها وارض تسير وفوقها قمم الروابي فضاء لا انتهاء له وشمس تضيء بحسبة بين السحاب فشد كيانك الادنى برب تنال بقربه شرف الجناب!";
Console.OutputEncoding = Encoding.UTF8;
Console.WriteLine($"Before: \"{original}\", \nafter: \"{original.ShapeArabic()}\".");
internal static class StringExtensions
{
@TheVeryStarlk
TheVeryStarlk / chunk-format.en.md
Last active December 18, 2025 14:39
Minecraft's 1.8 Chunk Format

This article explains how chunk packets work in Minecraft 1.8 (PVN 47). I was motivated to write this due to the lack of easily understandable documentation for this version of Minecraft. I drew inspiration from the Wiki's article. This article wouldn't have been possible without the awesome folks from the Minecraft Protocol Discord server.

Terminology

  • Section: A 16x16x16 collection of blocks, including block light and skylight.
  • Chunk: A vertical stack of 16 sections.

Packets

  • 0x21: Used to send a single chunk column.
@TheVeryStarlk
TheVeryStarlk / login_system.py
Last active February 6, 2022 15:01
Simple but yet buggy login system.
"""
Simple but yet buggy login system.
You need to have a "database.txt" file.
"""
import tkinter
class AccountHandler:
def __init__(self, file_path):
self.file_path = file_path