Skip to content

Instantly share code, notes, and snippets.

@wispborne
wispborne / userstyle.css
Created March 23, 2026 16:55
Audiobookshelf Style
/* Wisp's Dark Theme */
:root {
/* ## Personal Color Palette ## */
--theme-main: #101828;
/* Main background color */
--theme-secondary: #3BA99C;
/* Secondary accent color */
--theme-tertiary: #3BA99C;
/* --theme-tertiary: #E4B363; */
/* Tertiary highlight color */
@wispborne
wispborne / MovingTooltipWidget.dart
Last active April 15, 2025 17:28
Flutter widget to display a tooltip that follows the cursor and doesn't block clicks, like video game tooltips.
import 'dart:math' as math;
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:trios/themes/theme_manager.dart';
import 'package:trios/thirdparty/dartx/string.dart';
import 'package:trios/widgets/tooltip_frame.dart';
enum TooltipPosition { topLeft, topRight, bottomLeft, bottomRight }
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Fractal Softworks\Starsector]
"HungAppTimeout"="15000"
// Example Runner
try {
await replaceSelf(directoryWithNewVersionFiles);
} catch (error) {
Fimber.w('Error self-updating something. YOLOing.', ex: error);
}
if (currentPlatform == TargetPlatform.windows) {
await Process.start(
'cmd',
['/c', "start", "", Platform.resolvedExecutable],
@wispborne
wispborne / Example.version
Last active April 22, 2024 16:06
Example of Starsector Version Checker file on Gist
{
# To get this url, first create your Gist, then click Raw and copy the url,
# then remove the *second* number from the url (after "raw")
# so that it matches the format of the below url.
"masterVersionFile": "https://gist.githubusercontent.com/wispborne/dad950c16ae82b35cc43aab71a9fa0dc/raw/Example.version",
"modName": "MagicLib",
"modThreadId": "25868",
"modVersion": {
"major": "1",
"minor": "4",
enum SnackBarType {
info,
warn,
error,
}
showSnackBar({
required BuildContext context,
required Widget content,
bool? clearPreviousSnackBars = true,
@wispborne
wispborne / definition.dart
Last active December 15, 2022 15:24
starsector json petiteparser definition
// Copyright 2022 Andre Lipke
//
// Copyright 2014 The Flutter Authors. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
@wispborne
wispborne / Easing.kt
Created October 6, 2022 14:44
Methods for easing.
package org.wisp.gatesawakened.jumping
/**
* Taken from <a href="https://github.com/mattdesl/cisc226game/blob/master/SpaceGame/src/space/engine/easing/Easing.java">Github</a>
*
* @author Robert Penner (functions)
* @author davedes (java port)
* @author Wisp (kotlin port)
*/
object Easing {
@wispborne
wispborne / SystemFinder.kt
Last active October 6, 2022 14:43
SystemFinder - A Starsector class to find systems using vanilla's code but without requiring a BaseHubMission.
import com.fs.starfarer.api.campaign.*
import com.fs.starfarer.api.campaign.econ.CommodityOnMarketAPI
import com.fs.starfarer.api.campaign.econ.MarketAPI
import com.fs.starfarer.api.impl.campaign.missions.cb.BaseCustomBounty
import com.fs.starfarer.api.impl.campaign.missions.hub.HubMissionWithSearch
import com.fs.starfarer.api.impl.campaign.missions.hub.ReqMode
import org.lwjgl.util.vector.Vector2f
class SystemFinder
@JvmOverloads constructor(val mission: HubMissionWithSearch = BaseCustomBounty()) {
@wispborne
wispborne / StringUtils.java
Created May 18, 2022 06:10
Typo correction code for Starsector, based upon the CommandUtils class of LazyWizard's Console Commands.
import com.fs.starfarer.api.Global;
import com.fs.starfarer.api.campaign.FactionAPI;
import org.jetbrains.annotations.Nullable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
public class StringUtils {