Skip to content

Instantly share code, notes, and snippets.

View stmobo's full-sized avatar

Sebastian Mobo stmobo

View GitHub Profile
Exception ticking DropPodLeaving3884585 (at (185, 0, 157)): System.NullReferenceException: Object reference not set to an instance of an object
at BetterPawnControl.Patches.Pawn_OnExitMap.Postfix (Verse.Pawn __instance) [0x0000d] in <86458cbd531047b69c8262f27af6d49c>:0
at (wrapper dynamic-method) Verse.Pawn.Verse.Pawn.ExitMap_Patch1(Verse.Pawn,bool,Verse.Rot4)
at RimWorld.Planet.TravelingTransportPods.AddPod (RimWorld.ActiveDropPodInfo contents, System.Boolean justLeftTheMap) [0x0005d] in <83587a48aa8e49a28a1bdcd03d79e528>:0
at (wrapper dynamic-method) RimWorld.FlyShipLeaving.RimWorld.FlyShipLeaving.LeaveMap_Patch1(RimWorld.FlyShipLeaving)
at RimWorld.Skyfaller.Tick () [0x00150] in <83587a48aa8e49a28a1bdcd03d79e528>:0
at Verse.TickList.Tick () [0x0015c] in <83587a48aa8e49a28a1bdcd03d79e528>:0
(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 39)
ticksToImpact > LeaveMapAfterTicks. Was there an exception? Destroying skyfaller.
Exception ticking HeavyCargoShuttleSkyfaller3884583 (at (45, 0, 35)): System.NullReferenceException: Object reference not set to an instance of an object
at BetterPawnControl.Patches.Pawn_OnExitMap.Postfix (Verse.Pawn __instance) [0x0000d] in <86458cbd531047b69c8262f27af6d49c>:0
at (wrapper dynamic-method) Verse.Pawn.Verse.Pawn.ExitMap_Patch1(Verse.Pawn,bool,Verse.Rot4)
at RimWorld.Planet.TravelingTransportPods.AddPod (RimWorld.ActiveDropPodInfo contents, System.Boolean justLeftTheMap) [0x0005d] in <83587a48aa8e49a28a1bdcd03d79e528>:0
at SaveOurShip2.LeavingPodFix.PatchThat (RimWorld.FlyShipLeaving& __instance) [0x00271] in <12145b2568fe452f8a91e32a298843e1>:0
at (wrapper dynamic-method) RimWorld.FlyShipLeaving.RimWorld.FlyShipLeaving.LeaveMap_Patch1(RimWorld.FlyShipLeaving)
at RimWorld.Skyfaller.Tick () [0x00150] in <83587a48aa8e49a28a1bdcd03d79e528>:0
at Verse.TickList.Tick () [0x0015c] in <83587a48aa8e49a28a1bdcd03d79e528>:0
(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 39)
import subprocess as sp
import sys
import re
import dateutil.parser
from datetime import timezone
from pathlib import PurePath
git_log_format = [
"commit %H",
"refs: %D",

Keybase proof

I hereby claim:

import numpy as np
import matplotlib.pyplot as plt
signal_length = 300
timespan = 30
t = np.linspace(0, timespan, signal_length)
def impulse(a, x, shift, max_amp):
t = ((x + shift)/a)**2
y = np.exp(-t) / (np.abs(a) * np.sqrt(np.pi))
#include <SoftwareSerial.h>
#include <Wire.h>
/* sum of ASCII codepoints in 'GGA', 'GLL', etc. */
#define GGA 207
#define GLL 223
#define GSA 219
#define GSV 240
#define RMC 226
#define VTG 241
#include <SoftwareSerial.h>
const int rxPin = 9;
const int txPin = 12; // unused
const int actLed = 10;
const int fixLed = 8;
SoftwareSerial gpsSerial(rxPin, txPin);
@stmobo
stmobo / hoverslam.ks
Last active March 25, 2021 20:20
Yet another hoverslam script for kOS. Only works in vacuum.
declare function print_line {
parameter text.
parameter y.
print text:padright(terminal:width) at (0, y).
}
declare function fmt_number {
parameter n.
@stmobo
stmobo / how_to_port_kkl.txt
Created September 27, 2018 07:12
Tips on porting KisekaeLocal using JPEXS and the AIRSDK.
For future reference, this is how I updated KKL using the previous KKL version (v68) and the latest Kisekae from online:
- Grab k_kisekae2.swf and all of the other swfs loaded by it first. Each file you'll need to grab corresponds to an entry in Main.loadName or Main.loadItemName within k_kisekae2.swf.
(All of the subordinate swf files can be found under http://pochi.lix.jp/k_kisekae2_swf/ -- you can simply wget them or similar. They'll go into a local k_kisekae2_swf directory.)
- Take a copy of the previous KKL version and replace its version of k_kisekae2.swf with the latest version, then open it and kkl.swf up in JPEXS.
- Start by updating Main.version, Main.loadName, and Main.loadItemName in kkl.swf to match k_kisekae2.swf.
(This should just involve simple copy-pasting of P-code from k_kisekae2.swf to kkl.swf.)
- From there, it's a cycle of: attempt to run KKL > see what causes errors > fix said errors > repeat
- The AIRSDK includes a tool called `adl`. It'll allow you to run KKL in debugging
@stmobo
stmobo / uartDrive.c
Last active February 28, 2018 23:05
#pragma config(UART_Usage, UART1, uartUserControl, baudRate9600, IOPins, None, None)
#pragma config(UART_Usage, UART2, uartUserControl, baudRate9600, IOPins, None, None)
#pragma config(I2C_Usage, I2C1, i2cSensors)
#pragma config(Sensor, I2C_1, enc1, sensorQuadEncoderOnI2CPort, , AutoAssign )
#pragma config(Sensor, I2C_2, enc2, sensorQuadEncoderOnI2CPort, , AutoAssign )
#pragma config(Motor, port1, motor2, tmotorVex393_HBridge, openLoop)
#pragma config(Motor, port10, motor1, tmotorVex393_HBridge, openLoop)
//*!!Code automatically generated by 'ROBOTC' configuration wizard !!*//
short waitForChar(short port) {