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

Keybase proof

I hereby claim:

  • I am makstashkevich on github.
  • I am makstashkevich (https://keybase.io/makstashkevich) on keybase.
  • I have a public key ASDhzqt3OXmWo83J8kbNDXysGIMYPhYddXCcDWqvTrgEXwo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am makstashkevich on github.
  • I am makstashkevich (https://keybase.io/makstashkevich) on keybase.
  • I have a public key ASDhzqt3OXmWo83J8kbNDXysGIMYPhYddXCcDWqvTrgEXwo

To claim this, I am signing this object:

mkdir -p "$HOME/git"
cd "$HOME/git"
git clone --recurse-submodules https://github.com/MCMrARM/mcpelauncher-linux
cd mcpelauncher-linux
sudo dpkg --add-architecture i386
sudo apt install cmake gcc-multilib g++-multilib zlib1g-dev:i386 libx11-dev:i386 libzip-dev:i386 libpng-dev:i386 libcurl4-openssl-dev:i386 libssl-dev:i386 libgles2-mesa-dev:i386 libudev-dev:i386 libevdev-dev:i386
sudo apt install libgtk2.0-0:i386 libgtkglext1:i386 libasound2:i386 libnss3:i386 libxss1:i386 libgconf2-4:i386 libxtst6:i386 libudev1:i386
sudo apt install protobuf-compiler libprotobuf-dev:i386
sudo apt install libgles2-mesa-dev:i386 and libegl1-mesa-dev:i386
./setup_cef.sh
@MakStashkevich
MakStashkevich / gist:4843260fce84d09957361958cd57725c
Created May 21, 2020 16:24
Converter id:meta to Item::get(); function
<?php
interface BlockIds
{
const AIR = 0;
const STONE = 1;
const GRASS = 2;
const DIRT = 3;
const COBBLESTONE = 4, COBBLE = 4;
const PLANK = 5, PLANKS = 5, WOODEN_PLANKS = 5, WOODEN_PLANK = 5;
@MakStashkevich
MakStashkevich / toSubchunks.php
Created June 13, 2020 09:15
Convert XYZ to subchunks
<?php
class LevelUtils
{
/**
* @param Vector3 $pos1
* @param Vector3 $pos2
*/
static function printRegions(array $pos1, array $pos2)
{
@MakStashkevich
MakStashkevich / converterToUnicode.php
Created June 29, 2020 06:33
Php converter emojies to unicode
<?php
// Strips leading zeros
// And returns str in UPPERCASE letters with a U+ prefix
function format($str) {
$copy = false;
$len = strlen($str);
$res = '';
for ($i = 0; $i < $len; ++$i) {
@MakStashkevich
MakStashkevich / roadsUnicodeToChar.php
Created June 29, 2020 06:35
Roads on PHP to convert unicode to characters
<?php
// Because JSON directly supports the \uxxxx syntax the first thing that comes into my mind is:
$unicodeChar = '\u1000';
echo json_decode('"'.$unicodeChar.'"');
// Another option would be to use mb_convert_encoding()
echo mb_convert_encoding('&#x1000;', 'UTF-8', 'HTML-ENTITIES');
// or make use of the direct mapping between UTF-16BE (big endian) and the Unicode codepoint:
@MakStashkevich
MakStashkevich / queryHandle.php
Created July 18, 2020 04:36
query handle on php
<?php
/**
* Created by PhpStorm.
* User: MakStashkevich
* Date: 30.08.2018
* Time: 16:31
*/
class Query
{
@MakStashkevich
MakStashkevich / villager_v2.debug
Last active July 24, 2020 04:20
Villager v2 debug NBT (Bedrock Edition)
{
Armor: [{
Count: 0b,
Damage: 0 s,
Name: "",
WasPickedUp: 0b
}, {
Count: 0b,
Damage: 0 s,
Name: "",
@MakStashkevich
MakStashkevich / PaintChunkXZ.php
Last active August 1, 2020 11:37
Paint min\max x\z on chunks
<?php
function paint($minX, $maxX, $minZ, $maxZ)
{
$fromX = $minX >> 4;
$toX = $maxX >> 4;
$fromZ = $minZ >> 4;
$toZ = $maxZ >> 4;