Skip to content

Instantly share code, notes, and snippets.

View toinouH's full-sized avatar
❤️
Love you

Antoine Hassler toinouH

❤️
Love you
View GitHub Profile
@kennytv
kennytv / readme.md
Last active March 27, 2024 15:59
Signed Chat and Chat Types

Signed chat

This gist intends on clearing up some of the misinformation surrounding signed chat/the reporting feature Mojang has added to Minecraft 1.19.1. Here you can find both technical information as well as a general explanation of how these work.

Profile keys

After joining a server, clients now send a profile key used for verifying a message's authenticity. This key and thus the whole signing process is optional, but by default, servers enforce secure profiles for clients to send chat messages. Whenever the player sends a chat message and has a key associated, the message will be signed using their own private key, which the server then verifies using the public key sent after join. Assuming signature, timestamp, and message contents line up, the message goes through.

On the other end, clients can also require all broadcasted player messages to be signed, disregarding the ones without sender verified signatures.

Message signatures

@MeguminSama
MeguminSama / Discord Experiments.js
Last active May 1, 2024 15:35
Discord Experiments.js
let cache; webpackChunkdiscord_app.push([["wp_isdev_patch"], {}, r => cache=r.c]);
var UserStore = Object.values(cache).find(m => m?.exports?.default?.getUser).exports.default;
var actions = Object.values(UserStore._dispatcher._actionHandlers._dependencyGraph.nodes);
var user = UserStore.getCurrentUser();
actions.find(n => n.name === "ExperimentStore").actionHandler.CONNECTION_OPEN({
type: "CONNECTION_OPEN", user: {flags: user.flags |= 1}, experiments: [],
});
actions.find(n => n.name === "DeveloperExperimentStore").actionHandler.CONNECTION_OPEN();
webpackChunkdiscord_app.pop(); user.flags &= ~1; "done";
@toinouH
toinouH / flags
Last active August 18, 2020 17:34
Flags recommanded for Yatopia with zgc
java -Xms8G -Xmx10G -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:-UseParallelGC -XX:-UseParallelOldGC -XX:-UseG1GC -XX:+UseZGC -jar server.jar -nogui
# So whenever you stop it it doesn't go kaboom
PAUSE
# If you notice degraded performance, higher CPU usage, more memory commits/uncommits, setting the following flag might help you: -XX:-ZUncommit
# If your run a jdk more recent than the jdk 14 (fore eg 15 or 16 or +) use that flag to start your server: -DPaper.IgnoreJavaVersion=true
# If you want the gui remove this flag: nogui
# YOU MUST CHANGE Xms AND Xmx DEPENDING OF YOUR SYSTEM; it is better to have a -Xms 20% lower than the value of Xmx.
# To log GC to a file add the following flag: -Xlog:gc*:logs/gc.log:time,uptime:filecount=2,filesize=8M
@Toyz
Toyz / OW1 CMD
Last active April 8, 2024 19:34
All command line options to Overwatch
----------POSSIBLE OPTIONS----------------------------------------------
--account : [optional] account name to login with
--key : [optional] connection key for the server (defaults to 1 in debug)
--automationRoutine : [optional] automation routine to run after login
--startAutomationGraph : [optional] start up and execute automation global graph using provided guid
--gatherEffectStats : [optional] enables effect stat gathering
--noautoconnect : [optional] Do not automatically connect to a server
--fastQuit
--dumpAssetNames : Write to <file> a JSON map of GUID (String "0xabc...") to asset name for all soft assets
--startPosition : [optional] start position when joining a map