Skip to content

Instantly share code, notes, and snippets.

@shoghicp
shoghicp / Dockerfile
Last active February 7, 2023 04:51
Dockerfile to extract ZST WARC compressed from Parler dump
FROM python:3.7-buster
# 1. Download repo to folder (Download ZIP, or git clone)
# 2. Build via: $ docker build . -t warc_zstd
# 3. Point to folder of WARCs: $ docker run --volume ~/warcs/:/data warc_zstd
# 4. This will extract any unextracted .warc.zst
# From https://hastebin.com/raw/werapevufe
RUN DEBIAN_FRONTEND=noninteractive apt update && \
#!/bin/sh
#Emulates the sweeking step up/down Chicago tornado alarm
#Can be repeated multiple times
beep -f 300 -l 50 -d 0 -n -f 309 -l 50 -d 0 -n -f 318 -l 50 -d 0 -n -f 328 -l 50 -d 0 -n -f 337 -l 50 -d 0 -n -f 346 -l 50 -d 0 -n -f 355 -l 50 -d 0 -n -f 364 -l 50 -d 0 -n -f 373 -l 50 -d 0 -n -f 383 -l 50 -d 0 -n -f 392 -l 50 -d 0 -n -f 401 -l 50 -d 0 -n -f 492 -l 50 -d 0 -n -f 503 -l 50 -d 0 -n -f 514 -l 50 -d 0 -n -f 525 -l 50 -d 0 -n -f 536 -l 50 -d 0 -n -f 547 -l 50 -d 0 -n -f 558 -l 50 -d 0 -n -f 569 -l 50 -d 0 -n -f 580 -l 50 -d 0 -n -f 591 -l 50 -d 0 -n -f 602 -l 50 -d 0 -n -f 613 -l 50 -d 0 -n -f 520 -l 50 -d 0 -n -f 529 -l 50 -d 0 -n -f 538 -l 50 -d 0 -n -f 548 -l 50 -d 0 -n -f 557 -l 50 -d 0 -n -f 566 -l 50 -d 0 -n -f 575 -l 50 -d 0 -n -f 584 -l 50 -d 0 -n -f 593 -l 50 -d 0 -n -f 603 -l 50 -d 0 -n -f 612 -l 50 -d 0 -n -f 621 -l 50 -d 0 -n -f 756 -l 50 -d 0 -n -f 767 -l 50 -d 0 -n -f 778 -l 50 -d 0 -n -f 789 -l 50 -d 0 -n -f 800 -l 50 -d 0 -n -f 811 -l 50 -d 0 -n -f 822 -l 50 -d 0 -n -f 833 -l 50 -
INFO UNKNOWN InventoryTransaction log:
INFO UNKNOWN |- InventorySource #3 [-1]
INFO UNKNOWN | * InventoryAction [InventorySource $3] #0 [1 x Wool(35)@0] -> [0 x (0)@0]
INFO UNKNOWN | * InventoryAction [InventorySource $3] #0 [1 x Wool(35)@0] -> [0 x (0)@0]
INFO UNKNOWN | * InventoryAction [InventorySource $3] #0 [1 x Dark Oak Wood Planks(5)@5] -> [0 x (0)@0]
INFO UNKNOWN | * InventoryAction [InventorySource $3] #0 [1 x Raw Chicken(365)@0] -> [0 x (0)@0]
INFO UNKNOWN | * InventoryAction [InventorySource $3] #0 [1 x Raw Chicken(365)@0] -> [0 x (0)@0]
INFO UNKNOWN | * InventoryAction [InventorySource $3] #0 [1 x Dirt(3)@0] -> [0 x (0)@0]
INFO UNKNOWN | * InventoryAction [InventorySource $3] #0 [1 x Raw Porkchop(319)@0] -> [0 x (0)@0]
INFO UNKNOWN | * InventoryAction [InventorySource $3] #0 [1 x Raw Porkchop(319)@0] -> [0 x (0)@0]
@shoghicp
shoghicp / run.php
Last active September 26, 2020 10:33
Header Extractor - Usage: php run.php --input libminecraftpe.so --output headers/ --pointer-size 4 --asm
<?php
/**
* Minecraft: Pocket Edition header extractor
*
* This tool needs objdump (and objdump-multiarch + arm variants) installed on the current system
*
*/
const VERSION = "0.0.1";

How to ask for cards

Tweet to @DroidRosewater with card followed by the properties you want the card to have (or none for a fully random one!). It will reply to your tweet with a newly generated card. If it doesn't reply in one-two minutes, something went wrong or it couldn't generate one in time. Try again! If you don't get the expected results, check your parameters again, so you don't miss a colon.

Like: @DroidRosewater card or @DroidRosewater card type:creature: name:Elvish Presley:

Properties are in this format: key:value: key2:value2:. Note the closing colon : at the end.

@shoghicp
shoghicp / compile.sh
Last active April 3, 2016 15:41
PHP7 RC2 + pthreads 3.0 + YAML + other stuff needed to run it. Experimental
#!/bin/bash
[ -z "$PHP_VERSION" ] && PHP_VERSION="7.0.0RC2"
ZEND_VM="GOTO"
ZLIB_VERSION="1.2.8"
POLARSSL_VERSION="1.3.8"
LIBMCRYPT_VERSION="2.5.8"
GMP_VERSION="6.0.0a"
GMP_VERSION_DIR="6.0.0"
CURL_VERSION="curl-7_44_0"
@shoghicp
shoghicp / commands.md
Last active October 29, 2023 18:16
Some interesting commands to play with the new NBT support for items.

Items with custom name

give sho stick 1 {display:{Name:"§r§6§lNormal stick"}}

Items with enchantments

give sho gold_sword 1 {ench:[{id:9s,lvl:2s}]}
@shoghicp
shoghicp / regenerateNetwork.php
Last active July 4, 2020 12:27
Minecraft: PE network enum generator
<?php
$file = $argv[1];
if(!file_exists($file)){
die("File $file does not exist\n");
}
$contents = file_get_contents($file);
@shoghicp
shoghicp / MyPlugin.php
Created May 9, 2015 20:16
Example of new plugin format aimed for easy scripting.
<?php
/**
* This file is an example of a compressed plaintext plugin format for PocketMine
* It's aimed towards easy scripting, but not for normal plugin development.
*
* This kind of plugin won't be able to embed/load resources,
* nor have access to some features like fast permission/command integration.
*
* This first comment is used to define the properties like on plugin.yml,
<?php
namespace shoghicp\MinecraftSimulator\task;
use pocketmine\Player;
use pocketmine\scheduler\PluginTask;
use shoghicp\MinecraftSimulator\Loader;
class MarqueeTask extends PluginTask{