Skip to content

Instantly share code, notes, and snippets.

will-hart /
Created Sep 25, 2022
My helper for bevy system tests
use std::time::Duration;
use bevy::prelude::*;
use crate::core::time::SpectreTimePlugin;
pub struct TestWorld {
pub app: App,
will-hart / pedals.ino
Created Feb 8, 2022
Firmware for custom footpedals using "blue pill" STM32 boards
View pedals.ino
#include <USBComposite.h>
#define LEAN_LEFT_CHAR 'q'
#define LEAN_RIGHT_CHAR 'e'
#define LEAN_LEFT PA9
#define LEAN_RIGHT PA10
#define LED_PIN PC13
will-hart / LICENSE
Last active Jul 7, 2021
FFMPEG based video clipper
Public Domain
will-hart /
Last active Jan 12, 2020
Hexmap generator inkscape extension, without inkscape (and using python 3)
#!/usr/bin/env python
# borrowed from
# which isn't working in inkscape
# import inkex
import sys
# from inkex import NSS
import math
import lxml
will-hart /
Last active Oct 30, 2018
Get file information in a directory
# -*- coding: utf-8 -*-
Created on Tue Oct 30 13:43:22 2018
@author: Will Hart
from datetime import datetime
from os import walk, path
will-hart / SinglePlayerFallback.cs
Created Apr 13, 2017
Single Player Fallback (Forge Networking)
View SinglePlayerFallback.cs
namespace Goliath.Networking
#region Dependencies
using BeardedManStudios.Forge.Networking;
using BeardedManStudios.Forge.Networking.Unity;
// other usings
using UnityEngine;
will-hart / castle.scad
Last active Feb 5, 2017
A simple castle wall written in OpenSCAD
View castle.scad
// scale the wall up
wall_scale = 10;
// set wall proportions
wall_length = 1;
wall_thickness = 0.3;
wall_height = 0.8;
// crennelation properties
cren_duty_cycle = 0.5;
will-hart / AbstractComponent.cs
Last active Jun 8, 2018
Sentry ECS - a simple public domain entity component system
View AbstractComponent.cs
public abstract class AbstractComponent : IComponent
protected Entity _owner;
public AbstractComponent(Entity owner)
_owner = owner;
ID = Guid.NewGuid().ToString("n");
will-hart / events.cs
Last active Sep 7, 2016
Event driven version
View events.cs
/// PlayerManager.cs
using System;
public class PlayerManager : MonoBehaviour {
public event EventHandler PlayerDied;
will-hart /
Last active Sep 1, 2021
Stitch together tilemaps into a single image


This is a simple Python / PIL utility for taking a series of images in a tile map set and stitching them together into a single image. This is being used to convert these for


  1. Drop the file into the root directory of your tile map set, where all the numbered folders are
  2. Edit two lines in the file, these are commented - one for the number of folders and one for the number of images in each folder