Skip to content

Instantly share code, notes, and snippets.

View phit's full-sized avatar
💭
🥷

Philip T. phit

💭
🥷
View GitHub Profile
@phit
phit / keybase.md
Created April 9, 2017 05:23
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:

@phit
phit / 1-setup.md
Last active June 5, 2017 10:16
Twitch/Curse & Vanilla Minecraft Launcher Linking

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
@phit
phit / gradlesigning.md
Last active May 28, 2022 08:50
Gradle Signing for Dummies
@phit
phit / allow-java-firewall.bat
Last active October 21, 2017 00:08
simple batch script to allow javaw in the windows firewall
@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 / webhookRelay.js
Last active February 21, 2022 11:44 — forked from brussell98/webhookRelay.js
Make slack Grafana webhooks discord compatible
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 / dblClickEdit.plugin.js
Last active July 6, 2024 19:54
better discord double click edit plugin
//META{"name":"dblClickEdit"}*//
var dblClickEdit = function () {};
dblClickEdit.prototype.start = function () {
document.addEventListener("dblclick", dblClickEventListener);
};
dblClickEdit.prototype.load = function () {};
dblClickEdit.prototype.unload = function () {
@phit
phit / pseudoexplanation.java
Last active July 4, 2018 20:27
java.lang.IllegalArgumentException: timeout value is negative minecraft server
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 / lazyload_patcher.plugin.js
Created July 31, 2018 20:14
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';
@phit
phit / myhn.css
Last active June 18, 2020 15:42
my hackernews stylesheet
@-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;