Skip to content

Instantly share code, notes, and snippets.

View michidk's full-sized avatar
🐳
🐳🐳

Michael Lohr michidk

🐳
🐳🐳
View GitHub Profile
@michidk
michidk / gist:f4ab28e80450ef20ae9e404ea1a3b54c
Last active February 15, 2025 16:25
How to execute command on host Windows using devcontainers powered by WSL
We need some way to communicate.
-> Files. Dont even need a mount, since WSL/Windows has access to all files by default.
Windows filesystem notify events don't work in WSL filesystem mounted to windows.
-> Need to handle all logic in WSL
WSL can execute Windows .exe in Windows context.
Solution:
@michidk
michidk / main.zig
Last active April 21, 2025 16:29
Simple Zig Webserver
const std = @import("std");
const net = std.net;
const io = std.io;
const Response = struct {
status: []const u8,
headers: []const u8,
body: []const u8,
};
@michidk
michidk / main.zig
Last active April 21, 2025 16:29
Dynamic Zig Webserver
const std = @import("std");
const net = std.net;
const io = std.io;
const mem = std.mem;
const heap = std.heap;
const http = std.http;
const Response = struct {
status: []const u8,
headers: []const u8,
@michidk
michidk / led_webserver.ino
Created October 5, 2025 12:27
ESP32 LED Webserver
#include <WiFi.h>
#include <WebServer.h>
#define LED_PIN 2 // Abhaenig vom Board
WebServer server(80);
const char* SSID = "WiFi Name";
const char* PASSWORD = "passwort123";