This file contains hidden or 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 | |
declare(strict_types=1); | |
use pocketmine\math\Vector3; | |
require_once "vendor/autoload.php"; | |
function minVector(Vector3 $v1, Vector3 $v2) : Vector3{ | |
return new Vector3(min($v1->x, $v2->x) >> 9, 0, min($v1->z, $v2->z) >> 9); |
This file contains hidden or 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 | |
declare(strict_types=1); | |
/** | |
* @name WorldsConverter | |
* @main Frago9876543210\WorldsConverter\Main | |
* @version 1.0.0 | |
* @api 4.0.0 | |
*/ |
This file contains hidden or 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 | |
declare(strict_types=1); | |
if($argc < 2){ | |
die("Usage: php {$argv[0]} symbol\n"); | |
} | |
array_shift($argv); | |
$sym = trim(shell_exec("c++filt " . $raw = implode(" ", $argv))); | |
$parts = explode("::", $sym); |
This file contains hidden or 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 | |
$array = range(0, 19); | |
luck($array, 0.1, function(int $element) : void{ | |
echo "*** jack pot / $element / with 0.1\n"; | |
}); | |
luck($array, 0.9, function(int $element) : void{ | |
echo "* $element / with 0.9\n"; |
This file contains hidden or 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
#include <modloader/statichook.h> | |
#include <dlfcn.h> | |
#include <string> | |
static auto handshake = (size_t) dlsym(dlopen(nullptr, RTLD_LAZY), "_ZTV29ServerToClientHandshakePacket") + 0x10; | |
struct Packet { size_t vt; }; | |
struct LoginPacket; | |
struct ClientToServerHandshakePacket; | |
struct NetworkIdentifier; |
This file contains hidden or 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 | |
declare(strict_types=1); | |
class clazz{ | |
public $var1 = "value1"; | |
protected $var2 = "value2"; | |
private $var3 = "value3"; | |
} |
This file contains hidden or 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 | |
declare(strict_types=1); | |
namespace converter; | |
use function intdiv; | |
use function min; | |
class TimeUtils{ |
This file contains hidden or 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
function getDeclaredMethodsFromClass(obj) { | |
var methods = obj.class.getDeclaredMethods(); | |
for (var i = 0; i < methods.length; i++) { | |
console.log("\t" + methods[i]); | |
} | |
} | |
function getDeclaredFieldsFromClass(obj) { | |
var fields = obj.class.getDeclaredFields(); | |
for (var i = 0; i < fields.length; i++) { |
This file contains hidden or 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 | |
declare(strict_types=1); | |
class Hexdump{ | |
private static function toVisible(string $str) : string{ | |
for($i = 0; $i < strlen($str); $i++){ | |
if(32 > ($code = ord($str{$i})) || $code > 125){ | |
$str{$i} = "."; | |
} |
This file contains hidden or 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
0000 00 00 00 6c 1a 10 00 00 00 00 00 01 04 00 28 c1 ...l..........(. | |
0010 05 e0 ee 3a 44 53 2d 37 31 31 36 48 57 49 2d 53 ...:DS-7116HWI-S | |
0020 4c 31 36 32 30 31 33 31 30 31 31 41 41 57 52 34 L1620131011AAWR4 | |
0030 33 36 37 30 30 34 36 37 57 43 56 55 00 00 00 00 36700467WCVU.... | |
0040 00 00 00 00 00 10 01 00 00 01 f0 01 00 f0 01 c7 ................ | |
0050 02 00 07 df 00 00 00 00 00 00 00 00 00 00 00 00 ................ | |
0060 00 00 00 00 00 00 00 00 00 00 00 00 ............ | |
0000 00 00 00 28 63 00 00 00 a4 2d 36 89 00 03 00 09 ...(c....-6..... | |
0010 e5 2b a8 c0 05 e0 ee 3a 84 ef 18 b9 c2 ec 00 00 .+.....:........ |