Skip to content

Instantly share code, notes, and snippets.

View jack3898's full-sized avatar

Jack Wright jack3898

View GitHub Profile
@jack3898
jack3898 / script.sh
Created September 13, 2025 20:53
Make MacOS finder good
# Set text size to 14pt (default is usually 12)
defaults write com.apple.finder DesktopViewSettings -dict-add IconViewSettings '{ textSize = 14; iconSize = 64; labelOnBottom = 1; gridSpacing = 100; }'
defaults write com.apple.finder StandardViewSettings -dict-add IconViewSettings '{ textSize = 14; iconSize = 64; labelOnBottom = 1; gridSpacing = 100; }'
defaults write com.apple.finder FK_StandardViewSettings -dict-add IconViewSettings '{ textSize = 14; iconSize = 64; labelOnBottom = 1; gridSpacing = 100; }'
# Remove all .DS_Store in user folders
sudo find ~ -name ".DS_Store" -delete
# Restart Finder
killall Finder
@jack3898
jack3898 / GUIDE.md
Last active September 1, 2025 19:42
Framework Desktop mainboard small & compact homelab/NAS parts

Framework Desktop mainboard homelab / NAS component list

This is a little Gist I made to help others looking into buying a Framework mainboard for a homelab / NAS purpose. It's a mix of research I have undertaken to look for parts to work around the limited expansion capabilities of the Framework Desktop mainboard.

Bear in mind, this guide does not cheap out! It ensures that you get the best performance and reliability for your homelab or NAS setup for personal use only and maximises the potential of the Framework Desktop mainboard given its limitations. You may need to expand on my research to find the best components for your specific use case if your budget is more limiting.

Framework Desktop mainboard overview

While the Framework desktop mainboard is a beast in terms of its compute performance, and up to 128GB of unified memory, it only has two M.2 slots for storage expansion. This can be a limiting factor for users looking to build a high-capacity NAS or homelab environment.

@jack3898
jack3898 / README.md
Last active January 26, 2025 19:48
Alternative to Shadcn's theme provider

Improvements

  • Migration away from context to a global Zustand store for improved performance with selectors
  • Less reliance on useEffect and cleanup functions. Events are registered at the module level
  • Adds reactivity to system preference, changing preference in the OS will trigger a theme change in the browser if the user set their preference to "system"
  • Uses Zustand persist middleware for effortless localStorage synchronisation with state

Usage:

[
{
"roleId": "927645192801116172",
"rankRange": [1, 4294967295]
}
]
@jack3898
jack3898 / nodeReadableToWebReadable.ts
Created May 21, 2024 17:32
Node to/from web readable conversion
import { type Readable } from "node:stream";
export function nodeReadableToWebReadable(nodeReadable: Readable): ReadableStream {
return new ReadableStream({
start(controller): void {
nodeReadable.on("data", (chunk) => {
controller.enqueue(chunk);
});
nodeReadable.on("end", () => {
@jack3898
jack3898 / watch-replays.ps1
Created November 26, 2023 16:06
Run Danser CLI on new replay generated
###
# ABOUT: Watches for new replays and renders them with danser-cli
#
# HOW TO:
# 1. Download Danser from https://github.com/Wieku/danser-go and extract it
# 2. Download this script and place it in the same folder as danser-cli.exe
# 3. Open PowerShell and run the script with `.\watch-replays.ps1`
# 4. When new replays are created, they will be rendered with danser-cli
#
# NOTES:
@jack3898
jack3898 / guide.md
Last active April 17, 2024 10:04
How to authenticate with FakeYou using a username and password

How to authenticate with the FakeYou API without an API key

FakeYou's API does not have public support for an API key so unless you have been given an API token by the owner, you're left with session authentication.

This guide will predominantly revolve around TypeScript, but in the end, we will be using HTTP as our transfer protocol. So long as your language works with HTTP, you should be able to translate it to your language of choice!

Understanding how to authenticate

We will use session authentication, which means you need to send across a cookie to the API so that FakeYou recognises you.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
{
"tel": "(redacted)",
"mail": "(redacted)",
"location": "Essex, UK",
"message": "I am not currently looking for further opportunities. LinkedIn is the best way to get in touch!"
}
@jack3898
jack3898 / Convert collation MySQL MariaDB.md
Created July 28, 2021 08:37
A couple of queries that let you convert an entire database into a new collation.

Converting database collations for large databases (MySQL/MariaDB)

Make sure Barracuda is enabled and the default character set globally is set to your desired character set in my.cnf.

Query 1

ALTER DATABASE database_name CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci Of course, feel free to change the collations to what best suits you.

Then, get all of the queries to update the database tables and columns replacing the values that suit your situation: