Skip to content

Instantly share code, notes, and snippets.

@marpe
marpe / typescript_inferred_type.ts
Last active February 13, 2025 14:34
what is this shit
(alias) useQuery<{
id: number;
userId: number;
name: string;
description: string;
color: string;
icon: string;
deleted: boolean;
createdAt: Date;
updatedAt: Date;
@marpe
marpe / astro.config.ts
Last active October 22, 2024 21:05
astro.config.ts
import db from "@astrojs/db";
import mdx from "@astrojs/mdx";
import node from "@astrojs/node";
import vue from "@astrojs/vue";
import { defineConfig } from "astro/config";
export default defineConfig({
// base: new URL("./", import.meta.url).pathname,
integrations: [
db(),
@marpe
marpe / SpriteBatch.cs
Created December 22, 2022 06:42
MoonWorks SpriteBatch
namespace MyGame.Graphics;
[Flags]
public enum SpriteFlip
{
None = 0,
FlipVertically = 1,
FlipHorizontally = 2,
}
@marpe
marpe / example.cs
Last active December 14, 2022 18:47
ImGui window with splitter using docking
using System;
public abstract class SplitWindow
{
private string _leftTitle;
private string _rightTitle;
private string _dockSpaceId;
private Action _drawLeft;
private Action _drawRight;
public string Title;
@marpe
marpe / ImGuiRenderer.cs
Created November 13, 2022 12:59
Moonworks ImGui renderer
#pragma warning disable CS8618
using System.Runtime.InteropServices;
using ImGuiNET;
using MyGame.Graphics;
using SDL2;
namespace MyGame.TWImGui;
public enum ImGuiFont
namespace GunSmoker.Input;
public class InputBinds
{
[CVar("p1_gp_index", "Player 1 controller index")]
public static int P1ControllerIndex = 0;
[CVar("p2_gp_index", "Player 2 controller index")]
public static int P2ControllerIndex = 1;
@marpe
marpe / main.yml
Created February 4, 2021 10:29
gameci workflow file for unity testing with coverage and building
name: Actions 😎
on:
push:
branches:
- master
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}