Skip to content

Instantly share code, notes, and snippets.

Philip T. phit

Block or report user

Report or block phit

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@phit
phit / lazyload_patcher.plugin.js
Created Jul 31, 2018
lazyload_patcher.plugin.js
View lazyload_patcher.plugin.js
//META{"name":"lazyload_patcher"}*//
//jshint esversion: 6
//TODO: somehow reload/redraw the Channels object, for seamless patching
//TODO: find Channels prototype without it being added to the DOM, also for seamless patching
var lazyload_patcher = function() {
this.pluginName = 'LazyLoad Patcher';
View updatenetty.md

Updating netty manually for Minecraft 1.12

Get your minecraft_server.1.12.2.jar from the root of your server, download the latest netty full package http://dl.bintray.com/netty/downloads/netty-4.1.37.Final.tar.bz2

Open your server jar with 7zip and navigate to minecraft_server.1.12.2.jar\io\netty\

open the netty package you downloaded and go to netty-4.1.37.Final.tar.bz2\netty-4.1.37.Final.tar\netty-4.1.37.Final\jar\all-in-one\netty-all-4.1.37.Final.jar\io\netty\

@phit
phit / pseudoexplanation.java
Last active Jul 4, 2018
java.lang.IllegalArgumentException: timeout value is negative minecraft server
View pseudoexplanation.java
long maxTickTime = server.getMaxTickTime(); // value from server.properties
long i = this.server.getCurrentTime(); // starttime of current tick
long j = MinecraftServer.getCurrentTimeMillis(); // current time
Thread.sleep(i + maxTickTime - j); // error is thrown when the sleep time is negative
long cutoff = i + maxTickTime; // cutoff time for current tick
cutoff - j // if this result < 0 then somehow a tick took longer than the cutoff allowed but it wasnt killed,
@phit
phit / dblClickEdit.plugin.js
Last active Sep 16, 2019
better discord double click edit plugin
View dblClickEdit.plugin.js
//META{"name":"dblClickEdit"}*//
var dblClickEdit = function () {};
dblClickEdit.prototype.start = function () {
$(document).on("dblclick.dce", function(e) {
var target = $(e.target);
if(target.parents(".messageCompact-kQa7ES").length > 0) {
var msg = target.parents(".messageCompact-kQa7ES").first();
var opt = msg.find(".button-3Jq0g9");
@phit
phit / webhookRelay.js
Last active Jul 6, 2018 — forked from brussell98/webhookRelay.js
Make slack Grafana webhooks discord compatible
View webhookRelay.js
const express = require('express'),
bodyParser = require('body-parser'),
request = require('unirest'),
app = express();
function HEXToVBColor(rrggbb) {
return parseInt(rrggbb, 16);
}
app.disable('x-powered-by');
@phit
phit / allow-java-firewall.bat
Last active Oct 21, 2017
simple batch script to allow javaw in the windows firewall
View allow-java-firewall.bat
@ECHO OFF
SETLOCAL EnableDelayedExpansion
goto check_Permissions
:check_Permissions
echo Administrative permissions required. Detecting permissions...
net session >nul 2>&1
if %errorLevel% == 0 (
echo Success: Administrative permissions confirmed.
@phit
phit / gradlesigning.md
Last active Jun 17, 2017
Gradle Signing for Dummies
View gradlesigning.md

Setup

Windows

Download the GnuPG binary release for windows current version from the official site and install it.

Linux

Grab the latest gpg from your package manager if it's not installed already anyway ;)

@phit
phit / 1-setup.md
Last active Jun 5, 2017
Twitch/Curse & Vanilla Minecraft Launcher Linking
View 1-setup.md

First we will setup the assets, forge & libs to be called from the curse installation, to avoid duplication and to make Forge installed by Curse available in the Vanilla launcher. You might have to the delete the original folders from the the .minecraft directory, then run this in an elevated command prompt.

SET CURSEDIR=yourcursepathhere
mklink /D %CURSEDIR%\Minecraft\Install\assets %appdata%\.minecraft\assets
mklink /D %CURSEDIR%\Minecraft\Install\versions %appdata%\.minecraft\versions
mklink /D %CURSEDIR%\Minecraft\Install\libraries %appdata%\.minecraft\libraries
View keybase.md

Keybase proof

I hereby claim:

  • I am phit on github.
  • I am phit (https://keybase.io/phit) on keybase.
  • I have a public key whose fingerprint is FB69 B092 8B92 1C45 DC11 2272 48F8 4F35 867B 8C9D

To claim this, I am signing this object:

You can’t perform that action at this time.