Skip to content

Instantly share code, notes, and snippets.

View netgfx's full-sized avatar
💻
Working...

Michael Dobekidis netgfx

💻
Working...
View GitHub Profile
@netgfx
netgfx / tunnel.sh
Last active December 22, 2025 09:44
context tunnel - bash
#!/bin/bash
# ==========================================
# Tunnel Manager for AI Context
# Usage:
# ./tunnel.sh link <source_path> [target_name]
# ./tunnel.sh unlink [target_name]
# ==========================================
COMMAND=$1
@netgfx
netgfx / tunnel.ps1
Last active December 22, 2025 09:45
context tunnel - powershell
<#
.SYNOPSIS
Tunnel Manager for AI Context (Windows Version)
.DESCRIPTION
Creates or removes symbolic links to external folders to allow AI Agents
to access them as local context.
.EXAMPLE
.\tunnel.ps1 link "C:\Projects\ReferenceRepo" "_TEMPLATE"
.\tunnel.ps1 unlink "_TEMPLATE"
#>
@netgfx
netgfx / server.js
Created November 23, 2025 20:48
Hybrid System with Action Planning & Grounding Validation
// server.js - Hybrid System with Action Planning & Grounding Validation
import express from "express";
import dotenv from "dotenv";
import { ChatGoogleGenerativeAI } from "@langchain/google-genai";
import { StateGraph, START, END } from "@langchain/langgraph";
import axios from "axios";
dotenv.config();
const app = express();
@netgfx
netgfx / brevo-body.html
Last active January 3, 2025 13:27
An HTML body to send via Brevo
<!doctypehtml><html lang=en><meta charset=UTF-8><meta content="width=device-width,initial-scale=1"name=viewport><title>Project Interest</title><style>body,p,table,td{margin:0;padding:0;font-family:Arial,sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}table,td{border-collapse:collapse;mso-table-lspace:0;mso-table-rspace:0}@media only screen and (max-width:600px){.container{width:100%!important;max-width:100%!important}}</style><body style=margin:0;padding:0;background-color:#fff><table cellpadding=0 cellspacing=0 role=presentation width=100% style=background-color:#fff><tr><td style="padding:20px 0"align=center><table cellpadding=0 cellspacing=0 role=presentation width=100% style="max-width:700px;background-color:#f1f1f1;border:2px solid #000;padding:20px"><tr><td><table cellpadding=0 cellspacing=0 role=presentation width=100%><tr><td style="padding:0 8px"><span style=font-size:16px;color:#939599>Hi, my name is </span><span style=font-size:20px;color:#000>{{2.name}}</span> <span style=font-s
@netgfx
netgfx / Leaves.tsx
Created November 21, 2024 23:19
SeasonalParticles
import React, { useRef, useMemo } from "react";
import { Canvas, useFrame, useLoader } from "@react-three/fiber";
import { TextureLoader, Mesh, Group, Color, Texture } from "three";
import { OrbitControls } from "@react-three/drei";
interface LeafProps {
position: [number, number, number];
rotation: [number, number, number];
scale: number;
speed: number;
@netgfx
netgfx / logger.ts
Created February 2, 2024 09:15
typescript logger
/* modification of the logger https://github.com/mohitagrawal1305/nextjs-custom-logger/blob/main/helpers/logger.js */
/* typescript and small fix for nextjs usage */
/* use on your layout.tsx or high level provider
* declare global {
* interface Window {
* logger: any;
* }
* }
@netgfx
netgfx / stripe-tax-id-validation.js
Created December 22, 2023 13:31
Stripe TaxID validation function
// code is A.I generated, use with care
function isValidTaxId(taxId, country) {
let regex;
switch (country) {
case 'US':
// US EIN format: 00-0000000
regex = /^(\d{2}-\d{7})$/;
break;
case 'DE':
@netgfx
netgfx / useHLSVideoTexture.js
Created October 11, 2023 07:35
R3F HLS Video texture
import * as THREE from 'three'
import { useEffect, useRef } from 'react'
import { useThree } from '@react-three/fiber'
import { suspend, preload, clear } from 'suspend-react'
import Hls from 'hls.js'
export function useHLSVideoTexture(src, props) {
const { unsuspend, start, crossOrigin, muted, loop, ...rest } = {
unsuspend: 'loadedmetadata',
crossOrigin: 'Anonymous',
@netgfx
netgfx / animation.js
Created October 4, 2023 06:20 — forked from rtpHarry/animation.js
Three.js - play an AnimationAction in reverse. There are a bunch of threads saying this isn't possible but I found a way so I wanted to post it online in a place that people will hopefully stumble upon it.
// The class itself is based on the animation helper class in
// https://github.com/paulmg/ThreeJS-Webpack-ES6-Boilerplate
// but I have changed almost everything except for the class name and the update function.
import * as THREE from 'three';
export default class Animation {
constructor(scene, animations) {
this.scene = scene;
this.animations = animations;
@netgfx
netgfx / gist:6195da08cc46a23951749e0ab53633b3
Created July 31, 2023 13:39
Massively convert FBX files to GTLF on Windows
#!/bin/bash
input_folder="C:\Users\..."
output_folder="C:\Users\..."
for file in "$input_folder"/*; do
if [[ -f "$file" ]]; then
filename=$(basename -- "$file")
extension="${filename##*.}"
filename="${filename%.*}"