This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const textIsWhite = (color: string): boolean => { | |
const hex = color.replace("#", ""); | |
const c_r = parseInt(hex.slice(0, 2), 16); | |
const c_g = parseInt(hex.slice(2, 4), 16); | |
const c_b = parseInt(hex.slice(4, 6), 16); | |
const brightness = ((c_r * 299) + (c_g * 587) + (c_b * 114)) / 1000; | |
return brightness < 155; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"scripts": { | |
"prisma:generate": "prisma generate && node prisma-zod-ts-nocheck.js" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace your/namespace; | |
use JsonException; | |
use pocketmine\utils\Config; | |
// use your/plugin/Main | |
class Unicode { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace steellgold\utils; | |
use pocketmine\item\Item; | |
use pocketmine\nbt\BigEndianNbtSerializer; | |
use pocketmine\nbt\NBT; | |
use pocketmine\nbt\tag\CompoundTag; | |
use pocketmine\nbt\tag\ListTag; | |
use pocketmine\nbt\TreeRoot; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Utils; | |
class ChancePercentage { | |
public function chancePercentage(array $array = [ | |
"myFirstValue" => [ | |
"chance" => 3, | |
"name" => "Money x40000", | |
"content" => "This is mythic rarity! if you have luck you win this!!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Utils; | |
use Exception; | |
class UUID { | |
/** | |
* @throws Exception | |
*/ |
NewerOlder