Skip to content

Instantly share code, notes, and snippets.

@shoghicp
shoghicp / Comparator.php
Last active July 26, 2020 21:36
Minecraft PE .lst Information Extractor to obtain Protocol Information and Compare Versions
<?php
define("COMPARATOR_VERSION", "0.1");
ini_set("memory_limit", "512M");
$node1 = json_decode(@file_get_contents($argv[1]), true);
if($node1 == ""){
echo "Provide a valid json file produced by the Extractor".PHP_EOL;
exit(1);
}
$node2 = json_decode(@file_get_contents($argv[2]), true);
@dazld
dazld / perlin.php
Created March 23, 2012 18:59
PHP Perlin Noise Class
//This is a port of Ken Perlin's "Improved Noise"
// http://mrl.nyu.edu/~perlin/noise/
// Originally from http://therandomuniverse.blogspot.com/2007/01/perlin-noise-your-new-best-friend.html
// but the site appears to be down, so here is a mirror of it
class Perlin {
var $p, $permutation, $seed;
var $_default_size = 64;
@krakjoe
krakjoe / pthreads.md
Last active August 30, 2023 18:30
pthreads.md

Multi-Threading in PHP with pthreads

A Brief Introduction to Multi-Threading in PHP

  • Foreword
  • Execution
  • Sharing
  • Synchronization
  • Pitfalls