Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
🥷

Philip T. phit

💭
🥷
View GitHub Profile
@phit
phit / dev.md
Last active Sep 8, 2021
MultiMC Windows Development
View dev.md
@phit
phit / myhn.css
Last active Jun 18, 2020
my hackernews stylesheet
View myhn.css
@-moz-document domain("news.ycombinator.com") {
* {
color: #93A1A1 !important;
background-color: #323234 !important;
}
body > center > table > tbody > tr:first-child * {
background-color: #996a24 !important;
}
body > center > table > tbody > tr:first-child * a:hover {
background: #996a24 !important;
@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 4 full package https://netty.io/downloads.html

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.70.Final.tar.gz\netty-4.1.70.Final.tar\netty-4.1.70.Final\jar\all-in-one\netty-all-4.1.70.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 Jan 31, 2022
better discord double click edit plugin
View dblClickEdit.plugin.js
//META{"name":"dblClickEdit"}*//
var dblClickEdit = function () {};
dblClickEdit.prototype.start = function () {
document.addEventListener("dblclick", dblClickEventListener);
};
dblClickEdit.prototype.load = function () {};
dblClickEdit.prototype.unload = function () {
@phit
phit / webhookRelay.js
Last active Feb 21, 2022 — 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 May 28, 2022
Gradle Signing for Dummies
View gradlesigning.md
@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