Skip to content

Instantly share code, notes, and snippets.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
[
{
"addr": 0,
"fields": [
{
"fieldtype": "normal",
"end": 7,
"start": 7,
"name": "RESET",
"description": "",
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Yamakaja
Yamakaja / Polyquine2.c
Last active July 15, 2021 12:01
Polyquine2 (C & Java)
/* \u002a\u002f
import java.lang.System;
public class Polyquine2 {
public static void main(String[] args) {
String s = "\u002f\u002a */const char preamble[] = {0x2f, 0x2a, 0x20, 0x5c, 0x75, 0x30, 0x30, 0x32, 0x61, 0x5c, 0x75, 0x30, 0x30, 0x32, 0x66, 0xa, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x6a, 0x61, 0x76, 0x61, 0x2e, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x3b, 0xa, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x20, 0x50, 0x6f, 0x6c, 0x79, 0x71, 0x75, 0x69, 0x6e, 0x65, 0x32, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x20, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x20, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5b, 0x5d, 0x20, 0x61, 0x72, 0x67, 0x73, 0x29, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x73, 0x20, 0x3d, 0x20, 0x22, 0x5c, 0x75, 0x30, 0x30, 0x32, 0x66, 0x5c, 0x75, 0x30, 0x30, 0x32
@Yamakaja
Yamakaja / ImageViewer.java
Created September 28, 2017 07:09
Terminal image viewer
import java.lang.System;
import java.awt.image.BufferedImage;
import javax.imageio.ImageIO;
import java.io.File;
public class ImageViewer {
private static final char[] chars = new char[] {' ', '\u2581', '\u2582', '\u2583', '\u2584', '\u2585', '\u2586', '\u2587', '\u2588'};
private static final char getChar(int alpha) {
@Yamakaja
Yamakaja / ClassHacking.java
Last active September 7, 2017 16:46
Custom String
package me.yamakaja.unsafe.classhacking;
import com.sun.management.HotSpotDiagnosticMXBean;
import sun.misc.Unsafe;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.MethodType;
import java.lang.management.ManagementFactory;
import java.lang.reflect.Field;
@Yamakaja
Yamakaja / 0001-Online-Nick-patch.patch
Created July 21, 2017 17:08
Player Online-Nicking
From 1a3ca0df35fab472a431b91a13630520ab148df7 Mon Sep 17 00:00:00 2001
From: Yamakaja <[email protected]>
Date: Fri, 21 Jul 2017 19:07:01 +0200
Subject: [PATCH] Online-Nick patch
---
.../md_5/bungee/protocol/packet/LoginRequest.java | 7 ++--
.../net/md_5/bungee/connection/InitialHandler.java | 48 +++++++++++++++++++---
2 files changed, 46 insertions(+), 9 deletions(-)