Skip to content

Instantly share code, notes, and snippets.

Avatar

Jonas Reich JonasReich

View GitHub Profile
@JonasReich
JonasReich / satisfactory_supercomputer.py
Created Sep 12, 2021
Satisfactory Resource Calculator (Supercomputer)
View satisfactory_supercomputer.py
import math
# All available resource recipes
# Uncomment the ones that you want to resolve
recipes = {
# Computer components
"supercomputer": [[2, "ai limiter"], [3, "high speed connector"], [2, "computer"], [28, "plastic"]],
"ai limiter": [[20, "quickwire"], [5, "copper sheet"]],
"high speed connector": [[56, "quickwire"], [10, "cable"], [1, "circuit board"]],
"circuit board": [[2, "copper sheet"], [4, "plastic"]],
@JonasReich
JonasReich / ExtractTextureReportFromMemreport.ps1
Last active Jun 3, 2022
Extract Texture Report csv from UE4 Memreport
View ExtractTextureReportFromMemreport.ps1
# Copyright: Jonas Reich 2021
# Extracts the texture report table from UE4 .memreport files and stores them as separte csv files.
# Uses semicolon delimiters and opens the extracted file with its default application (for me: Excel)
[CmdletBinding()]
param(
[Parameter(Mandatory=$true,ValueFromPipeline = $true)]
[String]
$SourceFile
)
View GetMinBitSize.h
// Copyright 2019, Jonas Reich. All Rights Reserved.
// This file was created for an Unreal Engine project. Feel free to change uint32 to a custom unsigned integer type.
#include "CoreMinimal.h"
#pragma once
/**
* Get the number of bits required to display a given number.
* #TODO: Should be extended with static asserts to ensure it only compiles with unsigned integer types
@JonasReich
JonasReich / powershell_cheatsheet.md
Last active Dec 2, 2019
A cheat sheet for the power shell syntax and behavioral quirks I stumble across the most
View powershell_cheatsheet.md

PowerShell Cheat Sheet

When coming from other scripting environments (CMD, Python) it can sometimes be a bit confusing how PowerShell does things. These are the 10 points that surprise me the most after not using PowerShell for a while:

1. Execution Policy

By default PS is configured not to load any configuration files and not to allow running of .ps1 script files. This can be changed by either changing the ExecutionPolicy, or by unblocking a specific script file:

# Change the execution Policy (requires launching PowerShell with admin rights):
@JonasReich
JonasReich / git_config.cmd
Created Sep 29, 2019
Git configuration/setup script
View git_config.cmd
@echo off
echo ------------------------------------------
echo git_config.cmd - Git configuration Script
echo (c) Jonas Reich, 2019
echo ------------------------------------------
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Script config
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::