Skip to content

Instantly share code, notes, and snippets.

View Quackster's full-sized avatar

Alexandra Quackster

View GitHub Profile
@Quackster
Quackster / FiguredataConverter.java
Created September 5, 2025 04:19
Avatara4j figuredata conversion
package net.h4bbo.avatara4j.figure.converter;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import net.h4bbo.avatara4j.figure.readers.FiguredataReader;
import net.h4bbo.avatara4j.figure.types.FigureColor;
import org.json.JSONObject;
import org.json.XML;
import org.json.XMLParserConfiguration;
import java.time.LocalDateTime;
import java.time.DayOfWeek;
import java.util.*;
import java.util.stream.Collectors;
public class CronParser {
private final String expression;
private final Set<Integer> minutes;
private final Set<Integer> hours;
private final Set<Integer> daysOfMonth;
@Quackster
Quackster / BoxExamples.java
Created October 28, 2025 03:37
Java Lazily Load Library
// Value.java
import java.util.concurrent.CompletableFuture;
import java.util.function.Function;
import java.util.function.Supplier;
/**
* A container that holds a value and supports both eager and lazy transformations.
* Provides synchronous and asynchronous computation capabilities.
*
* @param <T> the type of the contained value
@Quackster
Quackster / LambdaJsonConverter.java
Created December 1, 2025 11:52
LambdaJsonConverter.java
package asm.predicate;
/**
* A library for converting Java lambda predicates to JSON and back using ASM bytecode analysis.
*
* Due to JVM limitations with dynamically generated lambda classes, this library works best with:
* 1. SerializablePredicate lambdas (recommended for runtime lambda conversion)
* 2. PredicateBuilder for programmatic predicate construction
* 3. Static method references that can be analyzed
*
@Quackster
Quackster / dump_process.py
Created January 18, 2026 13:23
aspack v2.12 dumper
import struct, os, ctypes, time, pefile
from ctypes import wintypes
CREATE_SUSPENDED = 0x4
STILL_ACTIVE = 259
class STARTUPINFOW(ctypes.Structure):
_fields_ = [
("cb", wintypes.DWORD),
("lpReserved", wintypes.LPWSTR),