Skip to content

Instantly share code, notes, and snippets.

@Oppodelldog
Oppodelldog / bletest.ino
Created February 9, 2025 10:00
sample application for Arduino Nano ESP32 - sample ble service + wifi webserver for log output
#include <WiFi.h>
#include <WiFiClient.h>
#include <WebServer.h>
#include <ESPmDNS.h>
#include "ArduinoBLE.h"
#define LOG_BUFFER_SIZE 2048
char logBuffer[LOG_BUFFER_SIZE];
size_t logWritePos = 0;
@Oppodelldog
Oppodelldog / scene_vertex_stats.gd
Last active January 20, 2025 20:51
Godot 4.3: list mesh details of the actual scene
extends Node3D
func _ready():
get_tree().create_timer(2).timeout.connect(func():
print("Listing meshes in the current scene ordered by vertex count (descending)...")
var meshes_data = collect_meshes(get_tree().root)
meshes_data.sort_custom(_sort_by_vertex_count_descending)
for data in meshes_data:
print("Vertex Count: %d (%d), Instances: %s, Node: %s, Mesh: %s" % [data["gpu_vertex_count"],data["vertex_count"], data["instance_count"], data["node_name"], data["mesh_path"]])
)
@Oppodelldog
Oppodelldog / godot-addon.py
Last active July 21, 2024 10:43
blender add on that supports export to godot and creating mesh colliders in blender
bl_info = {
"name": "Godot Colliders and Export Addon",
"blender": (3, 0, 0),
"category": "Object",
"description": "Creates and removes collider objects and exports GLTF files easily",
}
import bpy
import os
import re
@Oppodelldog
Oppodelldog / easy-fbx-export.py
Last active January 14, 2024 16:50
Blender add-on that makes FBX export easy. CTRL + SHIFT +F will export the selected object(s) into a configured target folder. Multiple selections will result in multiple exports. Object hierarchy is supported. To initialize the export path search for "Confiure Easy FBX Export Target Path".
import bpy;
import os;
bl_info = {
"name": "Easy FBX Export",
"author": "Oppodelldog",
"description": "This add-on makes FBX export easy. ",
"blender": (3, 4, 1),
"category": "Export",
}
@Oppodelldog
Oppodelldog / Cable.cs
Created January 1, 2024 21:06
Unity - Cable Physics
using System.Collections.Generic;
using UnityEngine;
public class Chain : MonoBehaviour
{
public float width = 0.1f;
public int segments = 10;
public Material material;
public float mass = 0.1f;
public float spring = 10f;
@Oppodelldog
Oppodelldog / Player.gd
Last active December 17, 2023 18:39
some 3d character controller script for godot engine
extends CharacterBody3D
## forward/backward speed
@export var zSpeed = 320
## left/right speed (strafe)
@export var xSpeed=380.5
## speed downwards when falling
@export var ySpeed = 275
## mouse sentitivity for horizontal mouse movement (player rotation around Y)
@export var mouseHSensitivity=0.1
@Oppodelldog
Oppodelldog / easy-gltf-export.py
Last active May 11, 2024 19:44
Blender add-on that makes GLTF export easy. CTRL + SHIFT +D will export the selected object(s) into a configured target folder. Multiple selections will result in multiple exports. Object hierarchy is supported. To initialize the export path search for "Confiure Easy GLTF Export Target Path"
import bpy;
import os;
bl_info = {
"name": "Easy GLTF Export",
"author": "Oppodelldog",
"description": "This add-on makes GLTF export easy. ",
"blender": (3, 4, 1),
"category": "Export",
}
@Oppodelldog
Oppodelldog / start-test-server.bat
Created September 16, 2023 15:39
run testserver for godot web exports
python test-server.py --root "C:GodotProjects\myGame\build\web" --file "mygame.html"
pause
@Oppodelldog
Oppodelldog / easy-obj-export.py
Last active December 10, 2023 12:21
Blender add-on that makes Wavefront obj export easy. CTRL + SHIFT +E will export the selected object(s) into a configured target folder. Multiple selections will result in multiple exports. Object hierarchy is supported. To initialize the export path search for "Confiure Easy OBJ Export Target Path"
import bpy;
import os;
bl_info = {
"name": "Easy OBJ Export",
"author": "Oppodelldog",
"description": "This add-on makes Wavefront obj export easy. ",
"blender": (3, 4, 1),
"category": "Export",
}
@Oppodelldog
Oppodelldog / abolitionist.go
Last active April 1, 2023 13:02
liberate repositories
package main
import (
"context"
"fmt"
"github.com/google/go-github/v50/github"
"github.com/xanzy/go-gitlab"
"golang.org/x/oauth2"
"os"
)