Skip to content

Instantly share code, notes, and snippets.

View ScatteredRay's full-sized avatar

Indy Ray ScatteredRay

  • San Francisco, Ca
View GitHub Profile
@ScatteredRay
ScatteredRay / setup.ps1
Created February 1, 2025 00:30
Windows setup and debloating
$ErrorActionPreference = "Stop"
Import-Module -Force (Join-Path (Split-Path -parent $PSCommandPath)'Util.psm1')
$config = Load-Config
$installerUrls = Load-InstallerUrls
Do-Elevate ($myInvocation.MyCommand.Definition + " -noprofile")
$scratchDir = (Get-ScratchPath)
@ScatteredRay
ScatteredRay / combineexr.py
Created November 4, 2024 00:02
TTRender Renderdoc Extract Buffers
import os
import fnmatch
import OpenEXR
import Imath
def WriteEXR(file, header, channels):
f = OpenEXR.OutputFile(file, header)
f.writePixels(channels)
def CombineEXR(outFile, inLayers):
template<t> struct Meta {};
enum myEnum {
Success,
Failure
};
template<>
struct Meta<myEnum> {
using type = Meta<myEnum>;
{
rocmSupport,
cudaSupport
} :
import ../nixpkgs {
config.cudaSupport = cudaSupport;
overlays = [
(final: prev: {
python3 = prev.python3.override {
packageOverrides = finalPy: prevPy: {
@ScatteredRay
ScatteredRay / test.cgfx
Created April 28, 2022 05:36
Minimal Motion Builder CGFX shader
float4x4 WorldViewProjection : WorldViewProjection < string UIWidget = "None"; >;
struct app2vert {
float4 position : POSITION;
};
struct vert2pixel {
float4 position : POSITION;
};
@ScatteredRay
ScatteredRay / cm.log.conf
Last active July 20, 2021 22:25 — forked from codicesoftware/cm.log.conf
Plastic SCM CLI log configuration file
<log4net>
<appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender">
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date %-5level %thread %logger - %message%newline" />
</layout>
</appender>
<appender name="FileAppender" type="log4net.Appender.FileAppender">
<file value="C:\logs\cm.log.txt" />
<appendToFile value="true" />
@ScatteredRay
ScatteredRay / hostnamegen.service
Last active July 1, 2020 22:06
Systemd unique hostname
[Unit]
Description=Generate Unique Hostname
DefaultDependencies=no
Wants=local-fs.target swap.target network-pre.target
After=local-fs.target swap.target
Before=network-pre.target
ConditionPathExists=!/etc/hostname
ConditionPathExists=!/boot/hostname
[Service]
// write the data to one end of the pipe
auto writer_seq =
sequence(
lazy([&]{
printf("writes starting!\n");
}),
transform_done(
repeat_effect(
typed_via(
defer(
@(at-point 'surface-struct
'(
(float3 albedo1 ;)
(float3 albedo2 ;)
(float blend ;)))
@(at-point 'surface-calc
'(
(surface . albedo1 = ... ;)
(surface . albedo2 = ... ;)