Skip to content

Instantly share code, notes, and snippets.

View robske110's full-sized avatar

Tim (robske_110) robske110

  • Germany
View GitHub Profile
@robske110
robske110 / dynTableCopy.php
Created March 14, 2021 17:39
Easy to use dynamic SQL table copier
<?php
// DynTableCopy
// Copyright robske_110 2021
declare(strict_types=1);
$dbConnectionConfig = [
"DB_SRC_HOST" => null,
"DB_SRC_NAME" => null,
"DB_SRC_USER" => null,
@soderlind
soderlind / Install.txt
Last active March 5, 2024 20:30
macOS DoH! (DNS over HTTPS) using cloudflared
1) Install cloudflared using homebrew:
brew install cloudflare/cloudflare/cloudflared
2) Create /usr/local/etc/cloudflared/config.yaml, with the following content
proxy-dns: true
proxy-dns-upstream:
- https://1.1.1.1/dns-query
- https://1.0.0.1/dns-query
@JackNoordhuis
JackNoordhuis / ListLatestMcVersions.php
Created March 4, 2018 04:31
A PHP script for fetching the latest Minecraft: Bedrock Edition releases from the app store.
<?php
$result = json_decode(getURL("https://itunes.apple.com/au/app/minecraft/id479516143?dataOnly=true"), true);
for($i = 0, $count = count($result["pageData"]) - 1; $i < $count; ++$i) {
$info = $result["pageData"]["versionHistory"][$i];
$releaseTime = new \DateTime($info["releaseDate"], new \DateTimeZone("Australia/Sydney"));
printf("Minecraft: PE version %s, released on %s" . PHP_EOL . PHP_EOL, $info["versionString"], $releaseTime->format("l\\, jS \\o\\f F Y"));
}
@Tomcc
Tomcc / blockstate_protocol.md
Last active April 9, 2024 08:42
Block Changes in Beta 1.2.13

Block Storage & Network Protocol Changes

Paletted chunks & removing BlockIDs brings a few big changes to how blocks are represented. In Bedrock, Blocks used to be represented by their 8 bit ID and 4 bit data; this means that we can only represent 256 blocks and 16 variants for each block. As it happens we ran out of IDs in Update Aquatic, so we had to do something about it :)

After this change, we can represent infinite types of Blocks and infinite BlockStates, just like in Java. BlockStates are what is sent over the network as they are roughly equivalent to the old ID+data information, eg. they're all the information attached to a block.

BlockStates are serialized in two ways:

PersistentID: a PersistentID is a NBT tag containing the BlockState name and its variant number; for example

@dktapps
dktapps / run.php
Last active February 15, 2023 04:52
A basic UDP proxy used to bypass client-side Xbox Live authentication in MCPE 1.2.
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
@extremeheat
extremeheat / 0001-Keep-better-track-of-inventory-changes-on-Windows-10.patch
Last active September 11, 2018 13:42
Various Minecraft: Windows 10 Edition-related patches for PocketMine-MP. Must be applied consecutively.
From ee6d6a6154ce35a4945add6aa6bd57f2144b185c Mon Sep 17 00:00:00 2001
From: extremeheat <extreme@protonmail.ch>
Date: Sun, 24 Apr 2016 00:46:33 -0400
Subject: [PATCH 1/4] Keep better track of inventory changes on Windows 10
Edition, fix inventory moving issues
---
src/pocketmine/Player.php | 198 ++++++++++++++++++++-
.../inventory/SimpleTransactionGroup.php | 26 ++-
2 files changed, 221 insertions(+), 3 deletions(-)
#!/bin/bash
#PocketMine automatic analysis tool
echo "[*] PocketMine automatic analysis tool"
cat > ttyecho.c <<'TTYECHO'
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
@RaVbaker
RaVbaker / readme.md
Created March 30, 2012 20:12
[HOWTO] Rewrite all urls to one index.php in Apache

Redirect All Requests To Index.php Using .htaccess

In one of my pet projects, I redirect all requests to index.php, which then decides what to do with it:

Simple Example

This snippet in your .htaccess will ensure that all requests for files and folders that does not exists will be redirected to index.php:

RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-d