Skip to content

Instantly share code, notes, and snippets.

View McManning's full-sized avatar
🐌

Chase McManning

🐌
View GitHub Profile
@McManning
McManning / indexed_resources_v3.json
Created April 17, 2023 15:21
V3 proposal of our resource format indexed to OpenSearch. This is refined from our prior formats (PI Portal, Catalog) to better integrate with Algolia InstantSearch, Searchkit v4, and our new WIP search services
// POST review/_doc/<id>
{
"name": "Test review 1",
// Description is indexed twice - one for the formatted variant
// and one for the searchable / snippet-capable variant that will
// be rendered in search hits.
"description": "A <strong>test</strong> review",
"textDescription": "A test review",
@McManning
McManning / process.md
Created October 31, 2022 14:39
Fun Times with Reset GPU Devices

Use Case

Two plugins are running in a project:

  • Plugin Foo is a custom URP that does a lot of procedural geometry work via compute.
  • Plugin Bar is a data pipeline plugin that forces a specific camera to render while the editor is out of application focus and outside of play mode. The results of that render are sent off to another app via native code.

The Problem

Unity Editor will occassionally do one of the following when plugins Foo and Bar run together:

@McManning
McManning / IN-18242.cs
Created October 1, 2022 19:21
IN-18242 - HDRP PostProcessVolume Variant
// Copy of the example GrayScale post processing volume for HDRP
// but with an added Readback request/wait to the command buffer.
// Combine this in a scene with the LeakMVP script running to observe leak.
[Serializable, VolumeComponentMenu("Post-processing/Custom/GrayScale")]
public sealed class GrayScale : CustomPostProcessVolumeComponent, IPostProcessComponent
{
[Tooltip("Controls the intensity of the effect.")]
public ClampedFloatParameter intensity = new ClampedFloatParameter(0f, 0f, 1f);
@McManning
McManning / Reset-Window.ps1
Created January 5, 2019 20:07
Powershell - Reset focused window to primary monitor
try{
[void][Window]
} catch {
Add-Type @"
using System;
using System.Runtime.InteropServices;
using System.Collections.Generic;
public struct RECT
@McManning
McManning / proposed_irb_api.yaml
Last active August 18, 2017 23:46
Proposed Buck-IRB API
swagger: "2.0"
info:
title: Proposed IRB API
version: 1.0.0
description: |
Proposed IRB API to be exposed for use in the Workflow app
as well as possibly exposing a simple high level details
page within PI Portal
host: orapps.osu.edu
basePath: /api/v1
@McManning
McManning / template.yaml
Created May 19, 2017 18:17
WIP: OpenAPI 2.0 specification template for JSON-API compliant services
# Using Swagger Spec 2.0: https://github.com/swagger-api/swagger-spec/blob/master/versions/2.0.md
# Compiled for use in Swagger Editor: http://editor.swagger.io/#/
swagger: '2.0'
info:
title: JSON-API Template
description: |
This template provides common patterns for documenting [JSON-API](http://jsonapi.org/format/) compliant endpoints into [OpenAPI specifications](http://swagger.io/specification/).
version: "1.0"
contact:
name: Chase McManning
@McManning
McManning / DeepCopyReplicationTest.php
Created December 20, 2013 16:00
Propel issue with improperly creating additional objects and improperly setting references when performing deep copies of one-to-one relationships.
<?php
require_once dirname(__FILE__) . '/../../tools/helpers/bookstore/BookstoreTestBase.php';
/**
* Tests for replicating one-to-one relations while performing a deep copy.
*
* @author Chase McManning
* @version $Revision$
* @package misc
@McManning
McManning / gist:6288785
Last active December 21, 2015 09:59
Too much salt. Need to stop.
/* Populate Fighters with all unique fighters, in alphabetical order */
DELETE FROM Fighters;
INSERT OR REPLACE INTO Fighters (Name)
SELECT RedName AS Name FROM Rounds
UNION
SELECT BlueName AS Name FROM Rounds
ORDER BY Name ASC;
/* Fighter storage integrity check */
-- SELECT * FROM Rounds WHERE RedName NOT IN (SELECT Name FROM Fighters) OR BlueName NOT IN (SELECT Name FROM Fighters);
;(function(fro, undefined) {
"use strict";
var NICKNAME_ZORDER = 9990; // Above everything else
fro.plugins.actorNicknames = {
initialise : function(options) {