Skip to content

Instantly share code, notes, and snippets.

View iamjohnmills's full-sized avatar

John Mills iamjohnmills

View GitHub Profile
@iamjohnmills
iamjohnmills / FAT32.md
Last active June 6, 2026 17:46
Format a USB Flash Drive as FAT32 on MacOS

The DiskUtility app for Mac does not support FAT32 within the GUI. You can, however, format a USB flash drive in MacOS from the terminal.

✓ Option 1: Use newfs_msdos

#Insert the drive -> open Terminal -> List your disks
diskutil list

# Identify your USB (e.g., /dev/disk2) -> Unmount the whole disk
diskutil unmountDisk /dev/disk2
@iamjohnmills
iamjohnmills / PASSGEN.md
Last active May 16, 2026 14:54
Macos Generate Password in Terminal
pw=$( (LC_ALL=C tr -dc 'A-Z' < /dev/urandom | head -c 1; LC_ALL=C tr -dc 'a-z' < /dev/urandom | head -c 1; LC_ALL=C tr -dc '!@#$%^&*' < /dev/urandom | head -c 1; LC_ALL=C tr -dc 'A-Za-z0-9!@#$%^&*' < /dev/urandom | head -c 9) | perl -MList::Util=shuffle -e 'print shuffle <>' ); echo $pw
@iamjohnmills
iamjohnmills / DOCKER.md
Last active May 16, 2026 14:54
Docker Quick Start New Setup
# NODE 16 IMAGE
docker build -t node-16 .

# NEW NODE 16 CONTAINER
docker run -d -it -v $(pwd):/src -p 5000:3000 -p 5001:3001 -e LANG='en_US.UTF-8' -e LANGUAGE='en_US:en' -e LC_ALL='en_US.UTF-8' --hostname node-github --name node-github node-16

# DOCKER SSH
docker exec -it <container-name> /bin/sh
@iamjohnmills
iamjohnmills / CLEANMAC.md
Last active May 16, 2026 14:55
Delete files in Macos that start with ._
@iamjohnmills
iamjohnmills / WORDS.md
Last active June 7, 2025 20:47
Where to a free list of words
@iamjohnmills
iamjohnmills / MINECRAFT.md
Last active May 18, 2026 20:57
Minecraft Server Docker Setup (MACOS) 2025

Gist Overview: Setup a Minecraft Server in Docker on MacOS (2025)


Java Edition Setup
Compatibility: Windows, Mac

# Download the image
docker pull itzg/minecraft-server
@iamjohnmills
iamjohnmills / LOCALES.md
Last active May 3, 2025 22:35
Timezone and Locale list as JS array

Gist Overview: Locales and Timezones in Javascript array syntax (2024)


// Locales
const locales = ['af-ZA','am-ET','ar-AE','ar-BH','ar-DZ','ar-EG','ar-IQ','ar-JO','ar-KW','ar-LB','ar-LY','ar-MA','arn-CL','ar-OM','ar-QA','ar-SA','ar-SD','ar-SY','ar-TN','ar-YE','as-IN','az-az','az-Cyrl-AZ','az-Latn-AZ','ba-RU','be-BY','bg-BG','bn-BD','bn-IN','bo-CN','br-FR','bs-Cyrl-BA','bs-Latn-BA','ca-ES','co-FR','cs-CZ','cy-GB','da-DK','de-AT','de-CH','de-DE','de-LI','de-LU','dsb-DE','dv-MV','el-CY','el-GR','en-029','en-AU','en-BZ','en-CA','en-cb','en-GB','en-IE','en-IN','en-JM','en-MT','en-MY','en-NZ','en-PH','en-SG','en-TT','en-US','en-ZA','en-ZW','es-AR','es-BO','es-CL','es-CO','es-CR','es-DO','es-EC','es-ES','es-GT','es-HN','es-MX','es-NI','es-PA','es-PE','es-PR','es-PY','es-SV','es-US','es-UY','es-VE','et-EE','eu-ES','fa-IR','fi-FI','fil-PH','fo-FO','fr-BE','fr-CA','fr-CH','fr-FR','fr-LU','fr-MC','fy-NL','ga-IE','gd-GB','gd-ie','gl-ES','gsw-FR','gu-IN','ha-Latn-NG','he-IL','hi-IN','hr-BA','hr-HR','hs
@iamjohnmills
iamjohnmills / ZSH.md
Last active June 7, 2026 02:07
Customzing your Macos terminal with ZSH and Themes

Gist Overview: Make a sleek custom ZSH prompt and theme for ZSH on MacOS (2025)


Customize ZSH Profile Prompt

# Open ZSHRC profile file
nano ~/.zshrc

# Function to adjust prompt to display current git branch with current directory

Gist Overview: Publish React build files to Github Pages using a branch (2025)


For New Projects

  1. Create a new branch from master git checkout -b public
  2. Remove dist from .gitignore
  3. Add your github base url (eg. myusername.github.io) to build configs.
  4. Build project, then add/commit files.