Skip to content

Instantly share code, notes, and snippets.

View 0XDE57's full-sized avatar

arbitrary hexcode 0XDE57

View GitHub Profile
import com.badlogic.gdx.scenes.scene2d.Actor;
import de.golfgl.gdx.controllers.ControllerMenuStage;
import de.golfgl.gdx.controllers.IControllerScrollable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class ControllerScrollableHelper implements IControllerScrollable {
private final ControllerMenuStage stage;
@pawlos
pawlos / xrefs.py
Last active November 21, 2021 05:54
Ghidra's script to automate adding of XREFs for lost_in_your_eyes from DiceCTF
#script for https://www.youtube.com/watch?v=FvH7b_qLmbU
import struct
from ghidra.program.model.symbol import *
xrefs = currentProgram.getReferenceManager()
startAddr = currentAddress
currAddr = currentAddress
while True:
@crykn
crykn / switch_to_lwjgl3.md
Last active October 17, 2022 06:06
How to switch to libGDX's LWJGL3 backend

How to switch your libGDX project to LWJGL 3


--- This guide is now available on libgdx.com. Check it out here. If you have any questions, join us on Discord! ---


  1. To switch to libGDX's LWJGL 3 backend, open your root build.gradle file and replace the LWJGL backend dependency:
@haram
haram / be_fn.hpp
Last active December 4, 2023 13:55
Replicate BattlEye initialization to dump data out of it
#pragma once
#include <stdint.h>
#include <stdio.h>
namespace be
{
void print_message( const char* msg )
{
printf( "[BATTLEYE] %s\n", msg );
}
@captainhook
captainhook / SpotifyWhitelist
Last active December 29, 2023 17:32
Spotify whitelist, Pi-hole compatible. Original source: https://github.com/x0uid/SpotifyAdBlock
# Spotify's Anti-Adveritsing blocking servers, tricking services to stop music services (DONT BLOCK THESE!):
gcdn.2mdn.net
r9---sn-n4v7kn76.c.2mdn.net
gew1-accesspoint-b-zzfg.ap.spotify.com
ns1.p23.dynect.net
ns3.p23.dynect.net
ns4.p23.dynect.net
dns1.p07.nsone.net
dns2.p07.nsone.net
dns3.p07.nsone.net
package org.veiset.tsar.world
import com.badlogic.gdx.math.Vector2
import org.veiset.tsar.engine2.utils.component1
import org.veiset.tsar.engine2.utils.component2
import org.veiset.tsar.engine2.utils.x
import org.veiset.tsar.world.icon.WorldIcon
import kotlin.math.absoluteValue
import kotlin.math.cos
import kotlin.math.pow
@johnhw
johnhw / umap_sparse.py
Last active January 6, 2024 16:09
1 million prime UMAP layout
### JHW 2018
import numpy as np
import umap
# This code from the excellent module at:
# https://stackoverflow.com/questions/4643647/fast-prime-factorization-module
import random
@KdotJPG
KdotJPG / OpenSimplexNoiseTileable3D.java
Created December 25, 2014 13:18
Tileable 3D OpenSimplex Noise
/*
* OpenSimplex Noise in Java.
* by Kurt Spencer
*
* Tileable 3D version, preliminary release.
* Could probably use further optimization.
*
* w6, h6, and d6 are each 1/6 of the repeating period.
* for x, y, z respectively. If w6 = 2, h6 = 2, d6 = 2,
* then the noise repeats in blocks of (0,0,0)->(12,12,12)
@KdotJPG
KdotJPG / OpenSimplex2S.java
Last active April 29, 2024 17:30
Visually isotropic coherent noise algorithm based on alternate constructions of the A* lattice.
/**
* K.jpg's OpenSimplex 2, smooth variant ("SuperSimplex")
*
* More language ports, as well as legacy 2014 OpenSimplex, can be found here:
* https://github.com/KdotJPG/OpenSimplex2
*/
public class OpenSimplex2S {
private static final long PRIME_X = 0x5205402B9270C86FL;