Skip to content

Instantly share code, notes, and snippets.

View tatelax's full-sized avatar

Tate McCormick tatelax

View GitHub Profile
@tatelax
tatelax / firebase-scheduled-functions-emulator.js
Last active May 22, 2025 01:48
Emulate Firebase Functions
// Provide database URL and database name where specified
// Provide file location for your function
const express = require("express");
const admin = require("firebase-admin");
const functions = require("firebase-functions/v2");
const cron = require("node-cron");
const app = express();
@tatelax
tatelax / depthbutton.swift
Created December 3, 2024 23:19
SwiftUIDepthButton
import SwiftUI
struct DepthButton: View {
var body: some View {
GeometryReader { geometry in
let size = min(geometry.size.width, geometry.size.height)
VStack {
ZStack {
// Outer circle
// check for 'real' null
if (ReferenceEquals(obj, null)) {
}
// check for 'real' not-null
if (ReferenceEquals(obj, null) == false) {
}
// check for 'unity' null
if (obj == false) {
@tatelax
tatelax / BuildCLI.cs
Created October 13, 2021 02:11
Build CLI
namespace Scripts.Utils.BuildMaker.Editor
{
public static class BuildCLI
{
// Called via editor in batchmode command line arguments
public static void Build()
{
string[] args = System.Environment.GetCommandLineArgs();
string buildProfile = null;
@tatelax
tatelax / example.jenkinsfile
Created October 12, 2021 16:20
A basic Jenkinsfile for Unity projects
pipeline {
agent {
node {
label 'windows'
}
}
environment {
VERSION = readFile(file: "game/Assets/StreamingAssets/version.txt").trim()
}
stages {
@tatelax
tatelax / Option.cs
Last active September 22, 2021 17:43
fholm's Option<T>
using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
public struct Option<T> : IEquatable<Option<T>> {
T _value;
bool _hasValue;
public T Value {
[MethodImpl(MethodImplOptions.AggressiveInlining)]