Skip to content

Instantly share code, notes, and snippets.

View lamont-granquist's full-sized avatar

Lamont Granquist lamont-granquist

View GitHub Profile
--- /tmp/foo 2023-03-29 13:28:00
+++ /tmp/bar 2023-03-29 13:28:18
@@ -1,37 +1,31 @@
UrlConfig
{
- parentUrl = RealScaleBoosters/Parts/Atlas/RSBtankAtlasCentaur.cfg
+ parentUrl = RealScaleBoosters/Parts/Ares/RSBtankAresIstage2.cfg
PART
{
- name = RSBtankAtlasCentaur
--- /tmp/foo 2023-03-29 13:07:25
+++ /tmp/bar 2023-03-29 13:07:49
@@ -1,11 +1,11 @@
PART
{
- part = RSBtankAtlasCentaur_4290440520
+ part = RSBtankAresIstage2_4290396532
partName = Part
- persistentId = 303437742
- pos = 0.45395872,53.1564255,-1.26740801
--- /tmp/foo 2023-03-29 13:07:25
+++ /tmp/bar 2023-03-29 13:07:49
@@ -1,11 +1,11 @@
PART
{
- part = RSBtankAtlasCentaur_4290440520
+ part = RSBtankAresIstage2_4290396532
partName = Part
- persistentId = 303437742
- pos = 0.45395872,53.1564255,-1.26740801
<?xml version="1.0" encoding="UTF-8"?>
<!--
biome
maxcount: int - the sum of all spawned entities in the group may not exceed this number
respawndelay: game days - .000278 real seconds, .0167 mins
daytime: Any,Day,Night - determines the time of day the entity spawns
<property name="TotalAlive" value="3" />
total alive means how many are alive at once.
<property name="TotalPerWave" value="10,20" />Total per wave means a random number between the first and second. The total alive will replenish the dead ranks until TotalPerWave's random number is met.
<?xml version="1.0" encoding="utf-8"?>
<!--
Game stage spawning: All game stage spawning starts with a "Spawner" which is a named object referenced in the code
or other data (like POIs). The spawner itself contains all of the gamestage information for that particular spawner.
Examples: BloodMoonHorde spawner, or a large POI spawn, or a POI spawn that contains janitor zombies.
Each spawner defines a set of game stages. An individual game stage defines the actual spawning and spawning progression
for that specific stage. The game stage number is an estimate of "difficulty", higher game stages should be harder than
lower game stages.
@lamont-granquist
lamont-granquist / impatient_rust_error_handling.md
Last active December 6, 2022 22:35
Rust error handling for the impatient

I really don't care at all: unwrap()

Just panics if the API returns a None or Err:

fs::create_dir(dir).unwrap();

I don't care but I want a slighly better message: expect()

Archive: SubnauticaQMMplusMods.zip
Length Date Time Name
--------- ---------- ----- ----
110 08-07-2020 22:36 changelog.txt
891 04-11-2021 10:29 doorstop_config.ini
25088 02-03-2022 20:11 winhttp.dll
7 09-19-2022 13:21 steam_appid.txt
0 09-19-2022 16:22 doorstop_libs/
24516 08-07-2020 22:36 doorstop_libs/libdoorstop_x64.dylib
24396 08-07-2020 22:36 doorstop_libs/libdoorstop_x86.dylib
[LOG 11:39:48.008] Applying update KerbalismConfig/System/Science/CrewScience/ScienceLabs/@PART[*]:HAS[@MODULE[ModuleScienceConverter]]:BEFORE[RP-0-Kerbalism] to Bluedog_DB/Parts/Saturn/blue
dog_Saturn_S2_wetWorkshop.cfg/PART[bluedog_Saturn_S2_wetWorkshop]
[WRN 11:39:48.009] Cannot find key CrewCapacity in PART
[ERR 11:39:48.009] Error - Cannot parse variable search when editing key ec_rate = #$/CrewCapacity$
[WRN 11:39:48.010] Cannot find key CrewCapacity in PART
[ERR 11:39:48.010] Error - Cannot parse variable search when editing key analysis_rate = #$/CrewCapacity$
@lamont-granquist
lamont-granquist / mcpi.m
Last active March 28, 2022 17:18
Rough cut MCPI ODE IVP Solver
% implementation from:
% - https://oaktrust.library.tamu.edu/bitstream/handle/1969.1/ETD-TAMU-2010-08-8240/BAI-DISSERTATION.pdf
% - https://link.springer.com/article/10.1007/BF03321534
function [xnew, iter] = MCPI(ode, xold, tmin, tmax, N, tol, varargin)
x0 = zeros(size(xold));
x0(1,:) = xold(1,:) * 2
tau = cos((0:N).*pi./N);
k1 = ( tmax + tmin ) / 2;
class Base {
// Base has:
// - implementation details
// - public interface
// - protected interface
virtual public void whatever(void) {
/// code
}