Skip to content

Instantly share code, notes, and snippets.

View truedat101's full-sized avatar
💭
vr / ai / iot

David J. Kordsmeier truedat101

💭
vr / ai / iot
View GitHub Profile
import {
withAlpha,
withoutAlpha,
} from "SpectaclesInteractionKit.lspkg/Utils/color";
/**
* Enhanced 3D Line component with smooth spline interpolation
* Creates a 3D tube by extruding a circular cross-section along a path defined by scene objects.
*/
@component
@agrancini-sc
agrancini-sc / Spline from Line Render
Created May 28, 2025 23:07
Spline from Line Render
import {
withAlpha,
withoutAlpha,
} from "SpectaclesInteractionKit.lspkg/Utils/color";
import InteractorLineRenderer, {
VisualStyle,
} from "SpectaclesInteractionKit.lspkg/Components/Interaction/InteractorLineVisual/InteractorLineRenderer";
/**
* This class provides visual representation for a spline curve through a series of control points.
@agrancini-sc
agrancini-sc / DirectionalShadow.ts
Created April 23, 2025 16:00
Directional Shadow
// Import required modules
const WorldQueryModule = require("LensStudio:WorldQueryModule");
const EPSILON = 0.01;
/**
* DirectionalWorldQuery
*
* A utility that performs world queries in a direction defined by two scene objects.
* It can then project rays from a third object in that same direction.
@skang2-sc
skang2-sc / WebSocketConnection.ts
Created December 31, 2024 19:30
WebSocketConnection Helper
import Event from "SpectaclesInteractionKit/Utils/Event";
const HOST = "wss://[APP_NAME].herokuapp.com";
export class WebSocketConnection {
private remoteServiceModule: RemoteServiceModule = require("LensStudio:RemoteServiceModule");
private webSocket: WebSocket;
private onMessageEvent = new Event<WebSocketMessageEvent>();
public readonly onMessage = this.onMessageEvent.publicApi();
@digikar99
digikar99 / why-coalton-is-a-language.org
Last active April 15, 2025 08:57
An attempt at introducing Coalton to lispers without a background in ML-like languages

Coalton: Why is the interop not easier, and why might it be necessary for Coalton to be an entire language in itself?

If you came here searching for the context in which some reddit comments were written, you might want to check out this previous version of the article.

Several blog posts have been written about Coalton, about how it can be useful and what it brings to the table. However, to me, it hasn’t been clear why Coalton is the way to solve the problems that it does solve. Isn’t a simpler solution possible without making a full embedded language, and giving users the cognitive overhead of thinking about interop between normal lisp and coalton?

I have been thinking about this for a while as one of my pasttimes, and below I’ll summarize the better reasons why coalton might be the way it is. Perhaps, I couldn’t se

@edjdavid
edjdavid / file.md
Created October 13, 2022 12:45
Stream Windows webcam/desktop via RTSP

Can be used for streaming data (webcam or screen capture) from the Windows to WSL

Install

  1. Simple RTSP Server
  2. ffmpeg

Get the internal IP of WSL

Run from a WSL terminal

ip route list default | awk '{print $3}'
@Paraphraser
Paraphraser / Tutorial - Debugging MQTT traffic flows in IOTstack.md
Last active May 31, 2025 07:57
Tutorial: Debugging MQTT traffic flows in IOTstack

Tutorial: Debugging MQTT traffic flows in IOTstack

You have built an ESP32, ESP8266 or similar project. You are sure it is sending payloads via MQTT but the data doesn't seem to be arriving in Node-Red. You're at a bit of a loss as to what to do next.

This tutorial is specific to IOTstack where Mosquitto and Node-Red are running as Docker containers on a Raspberry Pi. Much of it is probably applicable to other environments but "your mileage may vary".

Related resources

@raiph
raiph / .md
Last active June 12, 2025 03:12
Raku's "core"

Then mathematical neatness became a goal and led to pruning some features from the core of the language.

— John McCarthy, History of Lisp

If you prefer programming languages with a tidy and tiny core, you're in for a treat. This article drills down to the singleton primitive at the heart of Raku's metamodel ("model of a model") of a model of computation ("how units of computations, memories, and communications are organized")1.

The reason I've written this article

It began with u/faiface's reddit post/thread "I'm impressed with Raku"2. One of their sentences in particular stood out for me:

@raulqf
raulqf / Install_OpenCV4_CUDA12.6_CUDNN8.9.md
Last active May 19, 2025 05:31
How to install OpenCV 4.10 with CUDA 12 in Ubuntu 24.04

Install OpenCV 4.10 with CUDA 12.6 and CUDNN 8.9 in Ubuntu 24.04

First of all install update and upgrade your system:

    $ sudo apt update
    $ sudo apt upgrade

Then, install required libraries:

/*
This example code is in the Public Domain (or CC0 licensed, at your option.)
Unless required by applicable law or agreed to in writing, this
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied.
*/
/****************************************************************************
*
* This file is for gatt server. It can send adv data, be connected by client.