Skip to content

Instantly share code, notes, and snippets.

View threethan's full-sized avatar

Ethan M threethan

  • USA - Massachusetts - Near Boston
View GitHub Profile
@threethan
threethan / DataStoreEditor.java
Last active January 5, 2024 03:40
An easy to use Java-only wrapper for Android DataStores which can be used to migrate from SharedPreferences
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.SharedPreferences;
import android.os.Build;
import android.preference.PreferenceManager;
import android.util.Log;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
// ==UserScript==
// @name Subpixel Kerning for Google Docs (Firefox Only!)
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Enables subpixel kerning on the content of google docs. Includes an automatic dark mode, see code comments for Dark Reader compatibility.
// @author threethan
// @match https://docs.google.com/document/*
// @icon https://ssl.gstatic.com/docs/documents/images/kix-favicon7.ico
// @grant none
// ==/UserScript==
@threethan
threethan / compress.sh
Created April 9, 2023 09:54
Compress Godot HTML5 export with gunzip for smaller file size
#!/bin/bash
### usage ./convert.sh game
## where game is baseName of the export
# Based on https://gist.github.com/natrim/1a19f4b7668e0474897f3f28171f3b33
# wish revisions from https://gist.github.com/natrim/1a19f4b7668e0474897f3f28171f3b33?permalink_comment_id=4108811#gistcomment-4108811
if [ ! "$1" ]; then
read -p 'Game name: ' game
else
@threethan
threethan / userChrome.css
Last active March 3, 2023 00:31
Windows 11 Styled Right-Click Menu for FireFox (userChrome tweak)
/*
* Makes the right-click menu in FireFox look like windows 11's native right click menus
*
* Add as your userChrome.css or append to an existing one
* https://www.reddit.com/r/firefox/wiki/userchrome/
*
* Created for Firefox 111 but should work with future versions
*/
menupopup {