Skip to content

Instantly share code, notes, and snippets.

View dirkk0's full-sized avatar

Dirk Krause dirkk0

View GitHub Profile
@dirkk0
dirkk0 / home.html
Created May 31, 2024 09:07
Minimal Flask-Login
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Home</title>
</head>
<body>
<nav>
@dirkk0
dirkk0 / blender_addon_ege.py
Created November 26, 2023 17:47
Easy glTF/glb Exporter Blender addon
bl_info = {
"name": "Easy glTF/glb Exporter",
"blender": (2, 80, 0),
"category": "Experiment",
"author": "Dirk Krause",
}
import bpy, os
class EgePanel(bpy.types.Panel):
@dirkk0
dirkk0 / main.js
Last active November 29, 2023 08:12
nodejs websocket with ws and http - full minimal example
// starter was this very helpful post from @lpinca
// https://github.com/websockets/ws/issues/2052#issuecomment-1142529734
// installation: npm install ws
const WebSocketServer = require("ws");
const http = require('http');
const PORT = process.env.PORT || 8084;
@dirkk0
dirkk0 / agent.gd
Created May 9, 2023 19:23
navigation server example for Godot 3.52
extends KinematicBody
onready var navigation = $"../Navigation"
var target # = $"../Position3D"
var speed = 10.0
var path = []
var path_index = 0
var pois = []
@dirkk0
dirkk0 / texteditor.html
Last active March 27, 2023 08:01
webview-node text editor example
<html>
<style>
#text {
width: 100%;
height: 90%;
}
</style>
<body>
@dirkk0
dirkk0 / server.js
Created July 23, 2022 09:38
minimal nodejs webserver without modules but with CORS
"use strict";
const http = require('http');
const url = require('url');
const fs = require('fs');
const path = require('path');
const port = process.argv[2] || 9000;
// via
// https://stackoverflow.com/questions/16333790/node-js-quick-file-server-static-files-over-http
<!doctype html>
<!--
Copyright 2018 The Immersive Web Community Group
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
@dirkk0
dirkk0 / deezer-minimal.html
Created September 5, 2021 09:37
Minimal JavaScript to get Deezer wo work. Don't forget to replace the APP_ID and put it on the domain associated with this ID.
<!DOCTYPE html>
<html>
<head>
<title>Basic Custom Player with Deezer JavaScript SDK</title>
<meta name="viewport"
content="width=device-width,initial-scale=1,shrink-to-fit=no,user-scalable=no,maximum-scale=1" />
<script src="https://e-cdns-files.dzcdn.net/js/min/dz.js"></script>
</head>
extends KinematicBody
export var speed = 10
export var acceleration = 5
export var gravity = 0.98
export var jump_power = 35
export var mouse_sensitivity = 0.3
var velocity:Vector3