Skip to content

Instantly share code, notes, and snippets.

View ImAMadDev's full-sized avatar
🏠
Working from home

AppGallery ImAMadDev

🏠
Working from home
View GitHub Profile
@Muqsit
Muqsit / WeightedRandom.php
Last active May 16, 2024 22:39
Weighted random in PHP with O(1) runtime complexity (Alias Method)
<?php
declare(strict_types=1);
use pocketmine\utils\Binary; // https://github.com/pmmp/BinaryUtils
use pocketmine\utils\Random; // https://github.com/pmmp/PocketMine-MP/blob/60938c8c9df4bf21d096f142c6579dfad92eb8c2/src/utils/Random.php
/**
* @phpstan-template T
*/
@BEcraft
BEcraft / ChildTeleport.php
Last active January 27, 2018 00:59
PocketMine
<?php
/**
* @name ChildTeleport
* @api 3.0.0
* @author BEcraft
* @version 1.0
* @main BEcraft\ChildTeleport\Loader
*/
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active September 9, 2025 08:02
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example