Skip to content

Instantly share code, notes, and snippets.

View sclark39's full-sized avatar

Skyler Clark sclark39

View GitHub Profile
@sclark39
sclark39 / NMSRefinerRecipes.json
Last active August 21, 2022 16:57
Json data with all the valid refiner recipes n No Man's Sky, along with the materials involved
{
"mats": {
"FUEL1": {
"Name": "Carbon",
"Symbol": "C",
"Icon": "TEXTURES/UI/FRONTEND/ICONS/U4SUBSTANCES/SUBSTANCE.FUEL.1.DDS",
"Color": "BA3730"
},
"FUEL2": {
"Name": "Condensed Carbon",
@sclark39
sclark39 / RemoveRiftSPhantomControllers.js
Created August 6, 2019 13:55
Run to fix phantom controllers showing up in Oculus after low battery events
const fs = require( 'fs' )
console.log( `Make sure OVRService has been stopped and Oculus is closed before running this!` )
let filename = process.env.LOCALAPPDATA + '\\Oculus\\DeviceCache.json';
console.log( `Opening ${filename}.` )
let file = fs.readFileSync( filename, {encoding: 'utf8'} )
let json = JSON.parse(file)
@sclark39
sclark39 / RenameGenericGraph.js
Last active May 11, 2021 14:08
Quickly rename all assets and files in GenericGraph plugin and ready it for inclusion in another plugin
'use strict';
const mkdirp = require('mkdirp');
const path = require('path');
const fs = require('fs');
const readline = require('readline').createInterface({
input: process.stdin,
output: process.stdout
});
@sclark39
sclark39 / RemixNamedTensors.py
Last active September 28, 2021 19:09
Function to take in a tensor and a desired set of named dimensions and then squeeze, unsqueeze and permute to match
def NTremix( tensor, target_dims, align='left', squeeze=True ):
# remove extra dimensions
if ( squeeze ):
tensor = tensor.squeeze()
# add missing dimensions
dim0 = tensor.names[0]
target_set = set(target_dims)
missing = [(dim0,tensor.size(dim0))]
let prev_tab_id = {}
async function onClick(tab)
{
try {
let current_tab = tab.id;
let current_window = tab.windowId;
// Find all the gmail tabs
var tabs = await browser.tabs.query({ windowId: current_window, url: "*://mail.google.com/*" });
if ( tabs.length == 0 )
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
item_roller_device := class(creative_device):
@editable RollTime:float = 5.0
@editable PickupTimeout:float = 5.0
@editable RollCycleDelay:float = 0.1
@sclark39
sclark39 / BoundedNoise.hlsl
Created October 8, 2024 18:32
Custom Material node to fix improper noise bounding. This will return a normalized 0..1 value out of the noise function in UE5.3.
float Out = MaterialExpressionNoise(
DERIV_BASE_VALUE(Position), // Position
Scale, // Scale
1.00000000, // Quality
0.00000000, // Function
bTurbulence, // bTurbulence
Levels, // Levels
0.00000000, // OutputMin
1.00000000, // OutputMax
LevelScale, // LevelScale