Skip to content

Instantly share code, notes, and snippets.

View Oppodelldog's full-sized avatar
🤘

Nils Wogatzky Oppodelldog

🤘
View GitHub Profile
@Oppodelldog
Oppodelldog / gist:42e1148d06ecd4a096325c7bd0d96cf3
Created September 8, 2021 12:46
linux - source from .env file
export $(cat .env | xargs)
@Oppodelldog
Oppodelldog / templatefields.go
Created June 20, 2021 09:25
get fields from go template
package page
import (
"html/template"
"sort"
"text/template/parse"
)
func GetTemplateFields(tpl *template.Template) []string {
return walker{fields: map[string]struct{}{}}.tree(tpl)
@Oppodelldog
Oppodelldog / TreeId.cs
Created January 22, 2021 21:32
create game objects tree id - may be used as scene persisting unique id (as long as long tree is not changed of course)
using System;
using System.Collections.Generic;
using UnityEngine;
namespace GameObjectHelper
{
public static class TreeId
{
public static string Get(Transform endOfTree)
{
@Oppodelldog
Oppodelldog / ScriptedImportMtz.cs
Created January 4, 2021 21:27
Unity Rendering Pipeline Import that converts Materialize projects (.mtz) into Unity Standard Shader Mateirals
using System;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Xml;
using System.Xml.XPath;
using UnityEditor;
using UnityEditor.AssetImporters;
using UnityEngine;
@Oppodelldog
Oppodelldog / index.html
Last active December 19, 2020 18:50
Phasmophobia Deduction Helper
<html lang="de">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>Phasmo-Praktikant</title>
<style>
* {
margin: 0;
padding: 0;
@Oppodelldog
Oppodelldog / main.go
Created September 20, 2020 22:01
dump label usages in go src
package main
import (
"fmt"
"go/ast"
"go/parser"
"go/token"
"io/ioutil"
"os"
"path"
@Oppodelldog
Oppodelldog / main.go
Created September 20, 2020 09:55
Resize Icon for unity
package main
import (
"bytes"
"fmt"
"github.com/nfnt/resize"
"image"
"image/png"
"io"
"io/ioutil"
@Oppodelldog
Oppodelldog / main.go
Created August 29, 2020 21:35
app icon creation
package main
import (
"bytes"
"fmt"
ico "github.com/Kodeworks/golang-image-ico"
"github.com/nfnt/resize"
"image"
"image/gif"
"image/png"
@Oppodelldog
Oppodelldog / main.go
Last active May 27, 2020 19:30
one sample of non blocking coroutine safe boolean access
package main
import (
"fmt"
"time"
)
func newT() T {
t := make(T)
export class Observer<T> {
protected handlers: Array<(arg0: T) => void>;
constructor() {
this.handlers = new Array<(arg0: T) => void>();
}
public subscribe(f: (arg0: T) => void) {
this.handlers.push(f)
}