Skip to content

Instantly share code, notes, and snippets.

View Beyley's full-sized avatar
🏳️‍🌈

Beyley Thomas Beyley

🏳️‍🌈
View GitHub Profile
@Beyley
Beyley / extract.js
Last active January 10, 2024 00:04
extract LBP PSP 128-bit decryption kley
const fs = require("fs");
//key.bin is a file containing the extracted 64-byte region starting from 0x003d9f30 in the decrypted LBP PSP US 2.0.5 EBOOT.BIN
let block = fs.readFileSync('key.bin');
let key = Buffer.alloc(16);
for (let i = 0; i < 16; ++i)
key[i] = block[(i * 4) + (i % 4)];
//psp.key is the output key.
fs.writeFileSync('psp.key', key);
@Beyley
Beyley / windowsglfw.c
Created November 24, 2022 07:40
glfw focus test
#include <GLFW/glfw3.h>
#include <stdio.h>
void error_callback(int error, const char* description)
{
fprintf(stderr, "Error: %s\n", description);
}
void function_name(GLFWwindow* window, int focused) {
printf("Focus event %d\n", focused);
@Beyley
Beyley / gl_ffmpeg.cpp
Created June 21, 2022 01:43
OpenGL FFmpeg integration, for modern FFmpeg
/*
based on github gist from rcolinray: https://gist.github.com/rcolinray/7552384
you need to build with glfw2, not glfw3.
adjusted for newer ffmpeg ( version>55 - avcodec_alloc_frame now is
av_frame_alloc, and some other defines have AV_ prefix added to it )
build it using something like:
g++ ./gl_ffmpeg.cpp \
-lavcodec -lavutil \
-lavformat \
-lavfilter \
@Beyley
Beyley / cl_init.lua
Created August 22, 2018 23:55
My GMOD gamemode Knife Fight
include( "shared.lua" )
function killcounter()
draw.WordBox( 8, ScrW() - 920, ScrH() - 98, "KillCount: "..LocalPlayer():GetNWInt("killcounter"),"ScoreboardText",Color(200,0,0,0),Color(255,255,255,255))
end
hook.Add("HUDPaint","KillCounter",killcounter)