Skip to content

Instantly share code, notes, and snippets.

View MakStashkevich's full-sized avatar
🍀
believe on the best

Maksim Stashkevich MakStashkevich

🍀
believe on the best
View GitHub Profile
@TwistedAsylumMC
TwistedAsylumMC / HotbarShortcuts.ahk
Created February 29, 2020 21:39
This script allows Windows 10 users to use the 1-9 keys in their inventories to act as shortcuts to easily move items in and out of their hotbar slots.
; Hotbar Shortcuts for Minecraft Bedrock Edition by TwistedAsylumMC
; This script allows Windows 10 users to use the 1-9 keys in their inventories
; to act as shortcuts to easily move items in and out of their hotbar slots.
; How to use this script:
; 1. Download AutoHotKey (If you haven't already) from https://www.autohotkey.com/download/
; 2. Save this file to your device and double click it to start the script
; 3. Load up your Minecraft client and go inside of a world
; 4. Inside your inventory, you can use the 1-9 keys to swap items around
@backslash-f
backslash-f / UIDeviceExtension.swift
Last active December 9, 2022 14:26
Get Apple device model / marketing Name
import UIKit
public enum ModelName: String {
case simulator
case iPod1, iPod2, iPod3, iPod4, iPod5
case iPad2, iPad3, iPad4, iPad5, iPad6
case iPadAir, iPadAir2, iPadAir3
case iPadMini, iPadMini2, iPadMini3, iPadMini4, iPadMini5
case iPadPro9_7, iPadPro10_5, iPadPro12_9, iPadPro2_12_9, iPadPro11, iPadPro3_12_9
case iPhone4, iPhone4S
@mlnor27
mlnor27 / useFetch.js
Last active November 23, 2022 09:32
"useFetch" - A little React hook to handle HTTP request
import { useEffect, useReducer, useRef } from "react";
const initialState = {
isLoading: false,
data: null,
err: null,
cancel: () => {}
};
const reducer = (state, { type, payload }) => {
@Frago9876543210
Frago9876543210 / dump.php
Last active September 30, 2021 11:50
bedrock_server packet tracer
<?php
declare(strict_types=1);
use pocketmine\network\mcpe\protocol\PacketPool;
use pocketmine\utils\BinaryDataException;
require_once "vendor/autoload.php";
$packetPool = PacketPool::getInstance();
nthreads CpuThread CpuProcess IoThread IoProcess
1.000000e+00 3.144138e-01 3.251026e-01 1.001459e+00 1.003092e+00
2.000000e+00 6.895385e-01 3.517330e-01 1.001673e+00 1.006315e+00
3.000000e+00 1.031855e+00 3.544722e-01 1.001369e+00 1.006683e+00
4.000000e+00 1.421367e+00 3.659563e-01 1.001482e+00 1.004262e+00
5.000000e+00 1.758888e+00 5.339592e-01 1.001763e+00 1.009259e+00
6.000000e+00 2.055879e+00 5.403588e-01 1.001714e+00 1.008378e+00
7.000000e+00 2.421100e+00 6.488514e-01 1.002105e+00 1.008495e+00
8.000000e+00 2.919692e+00 6.753159e-01 1.001981e+00 1.012398e+00
9.000000e+00 3.445944e+00 8.028872e-01 1.002099e+00 1.012729e+00
@shankartshinde
shankartshinde / UIDeviceExtension.swift
Last active December 9, 2022 15:16
UIDevice as extension to determine current type of device/simulator in Swift
//
// UIDeviceExtension.swift
//
// Created by shankars on 3/15/19.
// Copyright © 2019 shankars. All rights reserved.
//
import Foundation
import UIKit
<?php
declare(strict_types=1);
use Mdanter\Ecc\Crypto\{Key\PrivateKeyInterface, Signature\Signature};
use Mdanter\Ecc\Serializer\PrivateKey\{DerPrivateKeySerializer, PemPrivateKeySerializer};
use Mdanter\Ecc\Serializer\PublicKey\{DerPublicKeySerializer, PemPublicKeySerializer};
use Mdanter\Ecc\Serializer\Signature\DerSignatureSerializer;
class JWT{
@dktapps
dktapps / README.md
Last active August 13, 2021 20:36
Minecraft PE Android crashdump decoder script

Minecraft PE crashdump decoder

Setting up environment

Install depot_tools and make sure the tools are available in your PATH variable. You might need to add them to your path manually.

Getting a crashdump file

Requirements:

  • A rooted Android device with MCPE installed.
  1. Trigger the crash you want to debug. When your game crashes, DON'T RESTART IT.
<?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);
<?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";