Skip to content

Instantly share code, notes, and snippets.

View JNNGL's full-sized avatar
👋

JNNGL

👋
View GitHub Profile
@JNNGL
JNNGL / generator.py
Last active June 27, 2024 10:51
Animated unicodes in Minecraft using vanilla shaders
#!/usr/bin/python3
import math
import argparse
from PIL import Image
def build_frames(gif, animation_seconds):
num_frames = math.floor(gif.n_frames)
frame_width, frame_height = gif.size
@JNNGL
JNNGL / ZlibPrepend.java
Last active June 27, 2024 10:32
Prepend zlib compressed data with an uncompressed deflate block.
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.UncheckedIOException;
import java.nio.charset.StandardCharsets;
import java.util.Arrays;
import java.util.stream.Collector;
import java.util.zip.DataFormatException;
import java.util.zip.Inflater;
public class ZlibPrepend {
@JNNGL
JNNGL / RuntimeJNI.java
Last active May 13, 2023 18:29
JNI binding generation at runtime PoC
import org.objectweb.asm.*;
import java.io.File;
import java.net.URL;
import java.net.URLClassLoader;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Comparator;
import java.util.stream.Stream;
import static org.objectweb.asm.Opcodes.*;