Skip to content

Instantly share code, notes, and snippets.

View EDDxample's full-sized avatar

EDDxample EDDxample

View GitHub Profile
@EDDxample
EDDxample / playerdata.py
Created January 1, 2023 22:29
Script to fetch minecraft player data from its nickname
import base64
import json
import requests
def get_uuid(nickname: str) -> str:
"""
Response Body:
{
@EDDxample
EDDxample / attractor.java
Created January 17, 2023 23:51
Processing script to render Thomas' Cyclically Symmetric Attractor (labeled as .java for syntax highlighting)
final float SCALE = 25;
int frame = 0;
float B = 0;
void setup() {
size(500,500,P3D);
background(0);
}
@EDDxample
EDDxample / rust_heap_analysis.rs
Created June 24, 2023 02:53
Analysis of the Stack/Heap layout of a simple Vec<String> object.
use std::mem;
fn print_mem_bytes(ptr: *const u8, limit: usize) {
for i in 0..limit as isize {
print!("{:02x} ", unsafe { *ptr.offset(i) });
}
println!();
}
fn main() {
@EDDxample
EDDxample / ocr_window.py
Created February 19, 2024 23:23
Applies OCR to the rect defined by the resizable window that pops up. (Press 'd' to trigger OCR)
# pip install pygame pywin32 pytesseract
# tesseract binary: https://digi.bib.uni-mannheim.de/tesseract/
from queue import Queue
from threading import Thread
import pygame
import win32api
import win32con
import win32gui