Skip to content

Instantly share code, notes, and snippets.

@Lightnet
Lightnet / CMakeLists.txt
Created February 23, 2025 23:48
Grok SDL3 build test.
# CMake configuration for SDL 3.2.4 project with additional libraries (shared libraries)
# This file sets up a project to build an SDL 3 application in C, fetching SDL and its
# extension libraries (SDL_ttf, SDL_image, SDL_mixer) directly from GitHub repositories.
cmake_minimum_required(VERSION 3.11)
# Notes:
# - CMake 3.11+ is required for FetchContent, which downloads and builds external dependencies.
# - We're using C (not C++) for main.c, which uses SDL 3's callback-based main functions.
project(MySDLProject VERSION 1.0 DESCRIPTION "SDL 3.2.4 C test with callbacks" LANGUAGES C)
# Notes:
@Lightnet
Lightnet / threejs_ecs_jolt02.js
Created November 19, 2024 21:13
threejs ecs jolt physics test 02
/*
Project Name: threepolygonenginejs
License: MIT
Created By: Lightnet
GitHub: https://github.com/Lightnet/threepolygonenginejs
*/
// Notes:
// simple ground and cube button create test
// create box on gui
@Lightnet
Lightnet / shape.c
Created May 22, 2024 05:47
sdl2 window shape test.
// https://github.com/libsdl-org/SDL/issues/8791
//strip down version for testing image
// use sdl2 default image bmp test.
#include <stdlib.h>
#include <math.h>
#include <stdio.h>
#include "SDL.h"
#include <SDL_image.h>
#include "SDL_shape.h"
@Lightnet
Lightnet / input_save_load_scene.rs
Last active March 2, 2024 05:16
bevy Simple test using the input to save and load (S=save, D=load) Key.
Note this to remember how to do this...
// https://github.com/bevyengine/bevy/blob/main/examples/ecs/ecs_guide.rs
// https://github.com/bevyengine/bevy/blob/main/examples/scene/scene.rs
// https://www.youtube.com/watch?v=4uASkH-FUWk
//! This example illustrates loading scenes from files.
use std::fs::File;
use std::io::Write;

Using the https://vanjs.org/ to render html and javascript client build for gun.js

Features:

  • server minimalist
    • node js
  • user ui
    • login
    • register
    • forgot
  • change passphrase
@Lightnet
Lightnet / pygame_imgui_OpenGL.py
Created August 9, 2023 22:04
Simple Test for imgui pygame OpenGL to display the simple window content
import pygame
from imgui.integrations.pygame import PygameRenderer
import OpenGL.GL as gl
import imgui
import sys
def main():
pygame.init()
size = 800, 600
pygame.display.set_mode(size, pygame.DOUBLEBUF | pygame.OPENGL | pygame.RESIZABLE)
@Lightnet
Lightnet / README.md
Created July 31, 2023 04:37
python panda3d simple test ping

Simple ping test for server and client app window.

There is link refernces.

It base on panda3D docs, forum and other sites.

@Lightnet
Lightnet / README.md
Last active October 15, 2022 06:01
surrealdb inquirer http rest api

Work in progress!

By using the inquirer and surrealDB for http rest api testing builds.

To test the builds.

simple setup user and scope test.

@Lightnet
Lightnet / App.jsx
Created September 24, 2022 03:54
Bare minmal for solid-js build for testing.
export default function App(){
return (<>
<label> Hello World! </label>
</>)
}
@Lightnet
Lightnet / README.md
Last active October 2, 2022 17:45
SurrealDB test file. server nodejs

SurrealDB Nodejs.

surrealDB:

  • 1.0.0 beta 8
    • change to 'Content-Type': 'application/json' > 'Accept': 'application/json'
    • text to json response for better error handle checks

Test build for server in case of the browser client does work correct for testing. As long there headers and json or text for correct format for sql, sign in and sign up.

This is mixed with websocket(not added) and http request rest api to SurrealDB connection or request http for testing.