Skip to content

Instantly share code, notes, and snippets.

How to Use?

GUIStyle mystyle = new GUIStyle("some string from the list below");


UnityEditor.ConsoleWindow.Constants

  • "CN Box"
  • "Button"
@MadLittleMods
MadLittleMods / golang-escape-forward-slash-in-test-name.md
Last active October 18, 2025 16:47
Golang: Escape forward slash in test name when using `-run` regex

How to escape a forward slash in a test name when using -run to run a single Go test?

I don't think it's possible. The following are some other articles/blog posts reiterating this point.

The key seems to just not use any forward slashes in test names so you can target them individually no matter what.

Go Subtest Tips by Frew Schmidt

@MadLittleMods
MadLittleMods / Pendulum.cs
Last active May 22, 2025 05:29
A Unity script to Simulate Pendulum Motion
using UnityEngine;
using System.Collections;
// Author: Eric Eastwood (ericeastwood.com)
//
// Description:
// Written for this gd.se question: http://gamedev.stackexchange.com/a/75748/16587
// Simulates/Emulates pendulum motion in code
// Works in any 3D direction and with any force/direciton of gravity
//

Just some notes and references for myself.

  • In bash, you can access your C:\ drive via /mnt/c/
  • ~ = C:\Users\MLM\AppData\Local\lxss\home\mlm and is different from your Windows user directory C:\Users\MLM

How to google things

@MadLittleMods
MadLittleMods / go-test-sane-defaults.md
Last active January 30, 2025 20:46
The Go test runner has several quirks and pitfalls that don't match my expectations from other test runners (bad defaults)

Problems with the Go test runner

go test has some bad defaults that have eaten up my time.

Tests suddenly throwing panic: test timed out after 10m0s

Once you've added enough tests to a package, you will magically start to run into the panic: test timed out after 10m0s error. This is because the test -timeout option has a 10m default and the timeout applies on a test package basis, not a per-test basis as you might expect. So when the combined execution time of all tests in the package exceeds the 10-minute limit, this error arises. Diagnosing this issue can be particularly frustrating because each test run takes at least 10 minutes to reproduce and provide feedback. Additionally, the error message makes it seem like it's a single test being the problem, but it's just that one new test that was the straw that broke the camels back and crossed the 10 minute threshold overall.

The timeout mechanism should ideally operate on a per-test basis. If a package-level timeout is still desired, it sh

@MadLittleMods
MadLittleMods / mn-dmv-road-test-sign-up.md
Created October 25, 2024 05:51
How to sign up for a road test on the DMV website for a Minnesota drivers license

Tried to help someone sign up for their Minnesota (MN) drivers license road test and it was pretty confusing.

Here are some instructions:

  1. https://onlineservices.dps.mn.gov/EServices/
  2. Appointments -> Schedule an appointment
  3. Driver Services -> Class D Skill Exam - First Time (on the next page, it better clarifies this by saying "class D road test")
  4. Fill out the form
@MadLittleMods
MadLittleMods / TextAreaWithTabs.cs
Created May 20, 2015 04:23
Unity GUI text area: `MLMEditorGUI.TextAreaWithTabs(Rect position, string text)`
using UnityEngine;
using UnityEditor;
using System.Collections;
using System.Reflection;
using self = MLMEditorGUI;
using System.Collections.Generic;
public class MLMEditorGUI : MonoBehaviour {
@MadLittleMods
MadLittleMods / eufy-robovac-25c.md
Last active November 12, 2023 04:38
Fixing a main rolling brush that is "stuck" on a Eufy RoboVac 25c (Robot Vacuum)