Skip to content

Instantly share code, notes, and snippets.

View undefined06855's full-sized avatar
🐴
what can you even fit in 80 characters worth of text

undefined06855

🐴
what can you even fit in 80 characters worth of text
View GitHub Profile
@undefined06855
undefined06855 / customgameobject.cpp
Last active December 20, 2025 20:25
placing a custom gameobject during gameplay example
void HookedPlayLayer::placeSogBlock(cocos2d::CCPoint pos) {
// using gd::string here for android support
gd::vector<gd::string> values;
gd::vector<void*> exists;
// i think these were broken or won't compile for android so see what happens for you
values.resize(600);
exists.resize(600);
std::unordered_map<int, gd::string> properties = {
@undefined06855
undefined06855 / format.js
Created August 19, 2025 15:24
An object validation library to validate client sent data etc in node/bun
/**
* Helper function to extract the type of typeof
* @param {any} x
*/
function _typeof(x) {
return typeof x;
}
/**
* @typedef {ReturnType<typeof _typeof>} TypeofResult
@undefined06855
undefined06855 / average.py
Created June 24, 2025 18:54
most average geode mod icon generator(tm)
# usage: python average.py <type (mean|median)> <id author (optional)>
import sys
from PIL import Image
import numpy as np
import json
mod_ids = []
if len(sys.argv) == 2:
@undefined06855
undefined06855 / PerspectiveNode.cpp
Last active June 14, 2025 21:37
cocos2d-x perspective camera node
#include "PerspectiveNode.hpp"
PerspectiveCamera::PerspectiveCamera()
: m_dirty(true)
, m_projectionViewMatrix({ 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 })
, m_aim({ 0.f, 0.f, 0.f })
, m_pos({ 0.f, 0.f, -100.f })
, m_fov(80.f) {}
void PerspectiveCamera::setFOV(float fov) {
@undefined06855
undefined06855 / json.py
Created May 16, 2025 15:30
slow af python json parser
from typing import Union
class JSON:
Number = Union[int, float]
class UnexpectedTokenError(Exception):
pass
class UnexpectedEOFError(Exception):
pass
@undefined06855
undefined06855 / uber pp shader.fsh
Created March 2, 2025 15:36
Robtop's Geometry Dash post-processing shader
#ifdef GL_ES
precision mediump float;
#ifdef GL_FRAGMENT_PRECISION_HIGH
#define PRECISION highp
#else
#define PRECISION mediump
#endif
#else
@undefined06855
undefined06855 / keybinds.js
Created November 12, 2023 14:58
SSM Keybinds (unminified)
let dropWrapBlockSelection = 0
let currentlySelectingSubblock = false
let currentlyUsingBlock
function escapeFromDropwrap()
{
// stop everything and escape from the dropwrap
let dropWrapChildren = currentlyUsingBlock.parentElement.children
dropWrapChildren[dropWrapBlockSelection].style.backgroundColor = ""