Skip to content

Instantly share code, notes, and snippets.

Living life 16.6 ms at a time

Gabor Szauer gszauer

Living life 16.6 ms at a time
View GitHub Profile
gszauer / UI.js
Last active Jul 23, 2022
WebFS First Demo
View UI.js
function UpdateMetaData(WebFS, info) {
let infoDiv = document.getElementById('size');
//let location = window.location.href;
let location = (new URL(window.location.href));
let target = "filesystem:" + location.protocol;
if (target.endsWith(":")) {
target += "//";
else {
View types.h
#pragma once
typedef unsigned char u8;
typedef unsigned short u16;
typedef unsigned int u32;
typedef unsigned long long u64;
typedef __int8 i8;
typedef __int16 i16;
typedef __int32 i32;
gszauer / ASTNode.cs
Created Feb 25, 2022
View ASTNode.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ExpressionParser {
class ASTNode {
View MathParser.cs
// <expression> -> <term> (("+" | "-") <term>)*
// <term> -> <power> (("*" | "/") <power>)*
// <power> -> <unary> ("^" <power>)*
// <unary> -> ("-")? <unary> | <factor>
// <factor> -> NUMBER | "(" <expression> ")"
class Program {
public static void Main(String[] args) {
Program p = new Program("3");
gszauer / Polygon.cpp
Created Oct 14, 2021
View Polygon.cpp
#include "Polygon.h"
#include <list>
#include <algorithm>
#include <bitset>
#include <vector>
#include <list>
void DrawPixel(int x, int y, unsigned char r, unsigned char g, unsigned char b);
void DrawPixel(int x, int y, unsigned char r, unsigned char g, unsigned char b, unsigned char a);
View PolyRasterV0.cpp
#include "PolyRasterV0.h"
#include <cmath>
#include <iostream>
namespace Rasterizer {
void raster_polygon_assert(bool b) {
if (!b) {
*((u8*)0) = 42;
gszauer / Font.cpp
Last active Jun 22, 2022
Minimal ttf parser and rasterizer
View Font.cpp
#include "Font.h"
#include <tuple>
using std::vector;
using std::tuple;
using std::get;
void DrawPixel(i32 x, i32 y, u8 r, u8 g, u8 b);
View Line.cpp
#include "Line.h"
#include <cmath>
#include <iostream>
inline int max(int a, int b) {
if (a > b) {
return a;
return b;
gszauer /
Last active Aug 20, 2020
gameplay3d::Animation breakdown

Core classes


class Animation

Defines a generic property animation. To run an animation you must play an AnimationClip. Every Animation has the default clip which will run from begin-end time. You can create additional clips to run only parts of an animation and control various runtime characteristics, such as repeat count, etc.

TODO: Fill ouy with own words

gszauer / CurveExplorer
Created Jul 28, 2020
Explore Unity Curves
View CurveExplorer
using System.Collections;
using UnityEngine;
using UnityEditor;
public class CurveExplorer : MonoBehaviour
public AnimationCurve curve;
[MenuItem("CONTEXT/CurveExplorer/Copy Data")]
static void CopyCurveInfo(MenuCommand command)