Skip to content

Instantly share code, notes, and snippets.

View trojanfoe's full-sized avatar

Andy Duplain trojanfoe

  • Wickham, Hampshire, UK.
View GitHub Profile
@trojanfoe
trojanfoe / PrefabPool.m
Created May 6, 2015 10:10
Prefab Pool implementation
#import "PrefabPool.h"
#pragma mark - Private Interface
@interface PrefabPool ()
{
NSUInteger _nextIndex;
NSMutableArray *_pool;
}
#!/usr/bin/python
#
# Bump build number if source files have changed, writing the version and build
# number to source files as well as updating one or more info.plist files.
#
# usage: bump_build_number.py version-file version-impl-file version-header-file plist-file [ ... plist-file ]
#
import sys, os, subprocess, re
@echo off
REM Change this to where you want the files backed-up to...
REM (Always put a backslash at the end so xcopy knows you want to create a directory)
set dst="%USERPROFILE%\Backups\Minecraft Dungeons\"
set srcdir="%LOCALAPPDATA%\Packages\Microsoft.Lovika_8wekyb3d8bbwe\LocalCache\Local\Dungeons"
if exist %srcdir% goto find_subdir
set srcdir="%LOCALAPPDATA%\Dungeons"
if exist %srcdir% goto find_subdir
@trojanfoe
trojanfoe / main.rs
Last active December 12, 2024 13:38
Bevy starter template (0.15)
use bevy::diagnostic::{FrameTimeDiagnosticsPlugin, LogDiagnosticsPlugin};
use bevy::prelude::*;
fn main() {
let mut app = App::new();
app.add_plugins((
DefaultPlugins
.set(ImagePlugin::default_nearest())
.set(WindowPlugin {
primary_window: Some(Window {
@trojanfoe
trojanfoe / build-shadercross.py
Last active August 2, 2026 21:42
Build SDL_shadercross
#!/usr/bin/env python3
#
# Builds the SDL shadercross tool and installs it locally.
#
# Prerequisites:
# Python 3
# Git
# C++ compiler
# CMake
# Ninja