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
@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";
@JevinJ
JevinJ / ThreadPool.py
Last active March 27, 2022 07:56
An Interruptible/Pausable thread pool in python, KeyboardInterrupt will stop the pool, KeyboardInterrupt can be caught to start the pool where it left off.
import queue
import threading
import os
import time
import signal
class Worker(threading.Thread):
def __init__(self, tasks, results):
super().__init__()
self.tasks = tasks
@xISRAPILx
xISRAPILx / Horse.php
Created September 2, 2018 19:43
Horse colors
<?
public const WHITE = 0;
public const WHITE_WHITE = 256;
public const WHITE_WHITE_FIELD = 512;
public const WHITE_WHITE_DOTS = 768;
public const WHITE_BLACK_DOTS = 1024;
public const CREAMY = 1;
public const CREAMY_WHITE = 257;
public const CREAMY_WHITE_FIELD = 513;
@xISRAPILx
xISRAPILx / Query.php
Last active April 23, 2022 11:35
Класс для получения информации с сервера SAMP.
<?php
/**
*
* ____ _ _ ____ ____ _ __ __ ____
* | _ \| | | | _ \ / ___| / \ | \/ | _ \
* | |_) | |_| | |_) | \___ \ / _ \ _____| |\/| | |_) |
* | __/| _ | __/ ___) / ___ \_____| | | | __/
* |_| |_| |_|_| |____/_/ \_\ |_| |_|_|
*
* This project is not affiliated with SA-MP team nor RakNet.
@JasonCrowe
JasonCrowe / dict_2_excel.py
Created August 12, 2018 14:20
Save varied dicts to excel
from xlsxwriter import Workbook
players = [
{'dailyWinners': 3, 'dailyFree': 2, 'user': 'Player1', 'bank': 0.06},
{'dailyWinners': 3, 'dailyFree': 2, 'user': 'Player2', 'bank': 4.0, 'level': 'Gold'},
{'dailyWinners': 1, 'dailyFree': 2, 'user': 'Player3', 'bank': 3.1},
{'dailyWinners': 3, 'dailyFree': 2, 'user': 'Player4', 'bank': 0.32, 'time': 'AM'}
]
def write_excel(dict_objects, filename, sheetname=None):
ordered_list = []
<?php
declare(strict_types=1);
class clazz{
public $var1 = "value1";
protected $var2 = "value2";
private $var3 = "value3";
}
<?php
declare(strict_types=1);
namespace converter;
use function intdiv;
use function min;
class TimeUtils{
@ijortengab
ijortengab / mysqldump.sh
Created February 7, 2018 05:20
Synchronize database MySQL - Gak Pake Lama
#!/bin/bash
# Filename: mysqldump.sh
# Author: IjorTengab (http://ijortengab.id)
# Last Update: 2018-02-07
#
# Variables. Set by your own value.
HOST=
USER=
PASSWORD=
DATABASE=