Skip to content

Instantly share code, notes, and snippets.

View sylv256's full-sized avatar
๐ŸŽ€
sylveons

Sylv sylv256

๐ŸŽ€
sylveons
View GitHub Profile
@XiaoPangxie732
XiaoPangxie732 / ImplLookupGetter.java
Created August 18, 2024 12:45
Get IMPL_LOOKUP using FFI via JNI
import java.lang.foreign.*;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.VarHandle;
import java.lang.reflect.Field;
public class ImplLookupGetter {
public static final MethodHandles.Lookup IMPL_LOOKUP;
public static final int JNI_VERSION_21 = 0x00150000;
@burningtnt
burningtnt / TrustedLookupAccessor.java
Last active May 1, 2025 14:08
Access IMPL_LOOKUP without Unsafe
import java.lang.foreign.*;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodHandles;
public final class TrustedLookupAccessor {
private TrustedLookupAccessor() {
}
private static final MethodHandles.Lookup INSTANCE = null;
@amalrkc
amalrkc / NvChad-v1-Cheatsheet.md
Last active May 8, 2025 21:57
My personal cheatsheet for NvChad v1. Source: https://youtu.be/Mtgo-nP_r8Y

NvChad Cheatsheet

Setup

  • Install Neovim with instructions from here
  • Run alias vim=nvim to use 'vim' as an alias. ie: Run Neovim with the vim command.
  • Run echo 'alias vim=nvim' >> .zshrc to save the alias to shell configuration. This command shown here only works for zsh.
@oSumAtrIX
oSumAtrIX / README.md
Last active February 8, 2025 11:53
Useful snippets for Discord

Discord console scripts

My collection of scripts for Discord.

Scripts

  • friend_invitelink.js: Generate a friend invite link
  • clientside_nitro.js: Spoof the client and enable client side Discord Nitro
/// Takes a symbolic type constant and returns its size
/// Probably missing a few types but those were the most important
size_t get_sizeof_type(GLenum type)
{
switch(type)
{
case GL_BYTE:
case GL_UNSIGNED_BYTE:
return sizeof(GLbyte);
case GL_SHORT:
@Patbox
Patbox / cardboard-not-so-great.md
Last active May 1, 2025 20:21
Why you shouldn't use cardboard, banner or any other "hybrid" server

By looking that you are here you most likely use Cardboard/Banner/some other weird bukkit + Fabric project (or just someone linked to it).

Don't do it, it will cause more harm/instabilities to your server than good. But let's start at the beginning.

Few definitions before we start:

  • Bukkit - It means bukkit, spigot, paper and any forks of these,
  • Cardboard - mod by IsaiahPatton that tries to port bukkit ecosystem to fabric.
  • Banner - another mod trying to make plugins work with Fabric, similar to Cardboard.
  • Fabric - a Minecraft modding platform, includes Fabric Loader and Fabric API, everything written in this gist also applies to Quilt.
  • Mods - Mods designed for fabric and compatible platforms
// To subscribe to an event, pass this JSON text to the client through the WebSocket:
{
"body": {
"eventName": "NameOfEvent" // Replace with an event name listed below
},
"header": {
"requestId": "xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxxx", // UUID
"messagePurpose": "subscribe",
"version": 1, // Protocol version (currently 1 as-of 1.0.2)