Skip to content

Instantly share code, notes, and snippets.


David Whitman davidwhitman

  • Vermont, USA
View GitHub Profile
View Calculate_VRAM.go
package main
import (
_ "image/jpeg"
_ "image/png"
View InaraEngineerTweaks.js
// ==UserScript==
// @name Inara Engineer Tweaks
// @namespace
// @match
// @grant GM_addStyle
// @version 1.1 (Dec 2020)
// @author /u/Locust377
// @description - G5s are highlighted - Engineers that are more than 10,000ly away from me are "hidden"
// ==/UserScript==
davidwhitman /
Last active Mar 13, 2020
Roughly calculates VRAM used by starsector mods
import os
import math
from scipy import ndimage
from PIL import Image
dirPath = os.path.dirname(os.path.realpath(__file__))
debug = False
# Instructions for use:
# Place in Starsector/mods directory.
davidwhitman / Easing.kt
Created Mar 10, 2020
Easing functions, converted to Kotlin
View Easing.kt
* Taken from <a href="">Github</a>
* @author Robert Penner (functions)
* @author davedes (java port)
* @author Wisp (kotlin port)
object Easing {
object Quadratic {
davidwhitman /
Last active Jan 21, 2021
CI setup to create ready-to-eat Starsector mods



This setup will automate Github releases by creating a new release with a ready-for-users zipfile of your mod every time a git tag is pushed to your GitHub repository.


  1. Create a folder called .circleci in your mod directory. Add the files config.yml,, and blacklist.txt to it.
  2. Open .circleci/ with a text editor (e.g. VS Code, Notepad++). Change the value for modFolderName. This will be the name of the mod folder.
View Bitbucket_OnPrem_UserCss.user.css
/* ==UserStyle==
@name Bitbucket Blue Reskin by dwhitman
@version 1.0.2
@description A blue userstyle
@author Dwhitman
==/UserStyle== */
@-moz-document domain("") {
.look-and-feel-custom-theme .aui-header {
View Jira_OnPrem_UserCss.user.css
/* ==UserStyle==
@name JIRA Blue Reskin dwhitman
@version 1.0.1
@description A blue userstyle
@author David Whitman
==/UserStyle== */
@-moz-document domain("") {
.aui-header {
background-color: #333333 !important;
View Scan.kt
* Applies the latest result of `scan` to each item received in order to emit a new result (which is then provided to the next `scan` item).
* So, given an initial seed of 10 and the function `{ previous, input -> previous + input }`, we will get the following outputs for the specified inputs:
* In -> Out
* 1 -> 11
* 6 -> 17
* 1 -> 18
* 2 -> 20
View CiceroneSupportAppNavigator.kt
import android.content.Context
import android.content.Intent
import android.os.Bundle
import android.widget.Toast
import ru.terrakok.cicerone.commands.BackTo
import ru.terrakok.cicerone.commands.Command
View KotlinEpoxyModel.kt
import android.view.View
import androidx.annotation.CallSuper
import androidx.annotation.LayoutRes
import com.airbnb.epoxy.EpoxyModel
* Represents a `EpoxyRecyclerView` item model.
* This class allows us to use epoxy models with Kotlin without needing annotation processing or code generation.
abstract class KotlinEpoxyModel(