Skip to content

Instantly share code, notes, and snippets.

View SOF3's full-sized avatar
🚂
Watching the model train

Jonathan Chan Kwan Yin SOF3

🚂
Watching the model train
View GitHub Profile
PEMapModder: anyway, were we talking about resource loading?
+ dktapps: yeah, so i figure the only real reason we actually need the path in pluginbase is because of resource loading
+ dktapps: so if we separate that out into its own unit, then the loader can decide how resources should be accessed
+ dktapps: which makes that problem go awya
PEMapModder: I was thinking that different plugin loaders might pass different data to the plugins, e.g. PharPluginLoader and FolderPluginLoader provide path (or resource)
+ dktapps: like what?
PEMapModder: maybe there is some FtpPluginLoader that provides an FTP password, who knows
+ dktapps: hmm
+ dktapps: well
PEMapModder: or maybe an async style resource getter
<?xml version="1.0"?>
<idea-plugin version="2">
<id>io.pmmp.phpstorm.stub</id>
<name>PocketMine-MP Library</name>
<vendor email="team@pmmp.io" url="https://pmmp.io">PMMP Team</vendor>
<version>0.0.1</version>
<description>Adds the PocketMine-MP API into your library path</description>
<change-notes/>
<idea-version since-build="163.3984"/>
<depends>com.intellij.modules.platform</depends>
FROM ubuntu:bionic
MAINTAINER PMMP Team <team@pmmp.io>
EXPOSE 19132/tcp
EXPOSE 19132/udp
RUN apt-get update && apt-get --no-install-recommends -y install \
sudo \
ca-certificates \
jq \
@SOF3
SOF3 / salary.lm
Last active December 19, 2018 13:01
> summary(salary.lm)
Call:
lm(formula = Salary ~ ., data = data)
Residuals:
Min 1Q Median 3Q Max
-73805 -14818 -2794 9637 162228
Coefficients: (17 not defined because of singularities)
@SOF3
SOF3 / depGraph.php
Last active December 6, 2020 22:02
<?php
$opts = getopt("", ["directed", "path:"]);
$directed = isset($opts["directed"]);
$nodes = [];
class Node{
public $name;
public function __construct(string $name){
s s alice
[02:09:06] [Server thread/DEBUG]: alice is logged into Xbox Live
[02:09:06] [Server thread/INFO]: alice[/SPECTER:19133] logged in with entity id 1 at (world, 6, 96, -6)
[02:09:06] [Server thread/INFO]: Session started.
[02:09:06] [Server thread/DEBUG]: Setting view distance for alice to 8 (requested 8)
[02:09:09] [Server thread/DEBUG]: [AutoUpdater] Async update check failed due to "Operation timed out after 3969 milliseconds with 0 bytes received"
[02:09:09] [Server thread/DEBUG]: [PostBox] Queuing mode-3 query: SELECT sender_type, COUNT(*) count\n FROM postbox_post\n WHERE recipient_type = 'postbox.player' AND recipient_name = ? AND is_unread\n GROUP BY sender_type\n ORDER BY count DESC; | Args: ["alice"]
[02:09:09] [Server thread/CRITICAL]: Could not pass event 'pocketmine\event\player\PlayerJoinEvent' to 'PostBox v1.1.0': Unhandled async exception on SOFe\PostBox\PlayerJoinListener
[02:09:09] [Server thread/CRITICAL]: SOFe\AwaitGenerator\AwaitException: "Unhandled async exception" (EXCEPTION) in
#!/usr/bin/env php
<?php
//declare(strict_types=1);
const USAGE = /** @lang text */
<<<USAGE
Usage: phar <action> <phar file> ...
- stub : phar s <phar> [value]
set from file: sf <phar> <stub file>
- metadata : phar m <phar> [format: DUMP|Json|Yaml|Serialized|Export|Print]
@SOF3
SOF3 / 0-511.log
Last active February 15, 2018 13:21
Crawling #0: 121552436 Repo HTTPS7Team/Replenish Topics:
Crawling #1: 121102913 Repo MCPE-PC/OreAboveEndStone Topics:
Crawling #2: 105432804 Repo TheFixerDevelopment/FactionsPro Topics:
Crawling #3: 121604825 Repo BurritoMan46/Gkits Topics:
Crawling #4: 121574103 Repo jasonwynn10/PluginChecker Topics:
Crawling #5: 56465224 Repo jasonwynn10/MyPlot Topics: php, pocketmine, pocketmine-mp
Crawling #6: 110963239 Not Found!
Crawling #7: 118443375 Repo Brentie2006/BedWars-PM Topics:
Crawling #8: 106845398 Repo YTiStrafeNubzHD/KillBearBoys Topics:
Crawling #9: 120215610 Repo HTTPS7Team/WaterBoots Topics:
@SOF3
SOF3 / async-events.phase-i test case.php
Created February 15, 2018 03:26
Test case for async-events/phase-i
<?php
declare(strict_types=1);
/**
* @name AsyncEventTest
* @version 1.0.0
* @author SOFe
* @main SOFe\Test\AsyncEvent\Main
* @api 3.0.0-ALPHA11