Skip to content

Instantly share code, notes, and snippets.

View troyfontaine's full-sized avatar

Troy Fontaine troyfontaine

View GitHub Profile
@troyfontaine
troyfontaine / 1-setup.md
Last active December 1, 2025 15:11
Signing your Git Commits on MacOS

Methods of Signing Git Commits on MacOS

Last updated March 13, 2024

This Gist explains how to sign commits using gpg in a step-by-step fashion. Previously, krypt.co was heavily mentioned, but I've only recently learned they were acquired by Akamai and no longer update their previous free products. Those mentions have been removed.

Additionally, 1Password now supports signing Git commits with SSH keys and makes it pretty easy-plus you can easily configure Git Tower to use it for both signing and ssh.

For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing your commits with GPG.

@troyfontaine
troyfontaine / README.md
Last active November 17, 2025 07:38
How to Update the Firmware of a Crucial Consumer SSD on Linux via the Terminal

How to Update the Firmware of a Crucial Consumer SSD on Ubuntu 22.04 via the Terminal

This has been tested on Ubuntu 22.04 with 3x Crucial MX500 1TB SSDs purchased in 2023

  1. Install the required packages
    sudo apt-get install -y smartmontools unzip curl
    
  2. Check your current firmware version and note it-you will want to be sure that you are actually updating the firmware version (replace sdX with your actual device's identifier-leaving off any partition numbers as you're checking the block device and not the data on it)
@troyfontaine
troyfontaine / README.md
Created August 22, 2024 14:21
HP iLO4 On Ubuntu Noble 24.04 for use with HP ProLiant 8th Gen Servers

HP iLO4 on Ubuntu Noble 24.04 for use with HP ProLiant 8th Gen Servers

If you're a homelabber and are interested in attempting to use the iLO4's agentless management functionality (how is it agentless if you have to install software on the OS?), you can do so by installing the HP AMS Package

Install the Agentless Management Service

sudo su -
wget https://downloads.linux.hpe.com/SDR/repo/mcp/pool/non-free/hp-ams_2.8.3-3056.1ubuntu16_amd64.deb
dpkg -i hp-ams_2.8.3-3056.1ubuntu16_amd64.deb
@troyfontaine
troyfontaine / README.md
Last active September 7, 2025 17:57 — forked from telf3/README.md
certbot-dns-cloudflare on Asustor NAS running ADM 5

This will configure an Asustor NAS running ADM 5 to use a letsencrypt issued certificate without exposing the NAS to the internet (by using DNS Challenge instead of using port forwarding). To accomplish this, we need to use certbot with DNS-01 challenge to Cloudflare. To perform this task, you must SSH into the NAS.

  1. Elevate the terminal to root
sudo su
  1. Setup the required directories
@troyfontaine
troyfontaine / asus-falchion-nx-key-combinations.md
Last active August 1, 2025 07:13
ASUS Falchion NX Key Combinations

ASUS Falchion NX Key Combinations

Function Keys

Hot Key Function
FN + DEL Scroll Lock
FN + CTRL Menu
FN + P Print screen
FN + PgDn End
@troyfontaine
troyfontaine / readme.md
Last active July 17, 2025 02:01
Resize root partition (or how to remove the default /home partition) on CentOS 7 online

Resize root partition (or how to remove the default /home partition) on CentOS 7 online

This process requires that you are able to ssh OR log in locally using the root user account and that no services be running as users out of /home on the target machine.

The examples are from a default installation with no customization-you NEED to know what you're working with for volumes/partitions to not horribly break things.

By default, CentOS 7 uses XFS for the file system and Logical Volume Manager (LVM), creating 3 partitions: /,/home and swap.

NOTE: If you want to be sure that nothing is writing to /home you can either modify the host to boot into single-user mode OR try to use the systemctl isolate runlevel1.target command to switch (not tested! should work).

@troyfontaine
troyfontaine / README.md
Last active June 22, 2025 09:26
USG ddclient Upgrade Script

How to use this script?

Why, that's simple! Copy this script to your USG, run chmod +x on it and then, as a user with sudo permission, execute it.

Shamelessly borrowed from Brittanic on the Ubiquiti Unifi forums

How to use it?

Simply run the following command (note, if you are at all security concious-don't run it and instead review the script, then copy it to your USG to execute).

curl https://gist.githubusercontent.com/troyfontaine/7e6f93e32621177fc9a94e823adc52b5/raw/fix_ddns.sh | sudo bash
@troyfontaine
troyfontaine / PythonAndPowerShell.md
Last active March 20, 2025 14:27
Setting up Aliases for Python on Windows PowerShell

Getting Your Python (Development) On!

Python for Windows is really easy to install-but what if you had started in the world of MacOS/*nix OSes and miss that single command to call Python or Pip? What if you don't have access to modify your environment PATH?

Windows PowerShell has a feature called "Profiles" which allows you to configure your PowerShell in a similar fashion as you could with Bash, Zsh, etc.

Pretty cool huh?

Create a Profile

@troyfontaine
troyfontaine / palworld-dedicated-server-setup.md
Last active February 21, 2025 21:41
Set up a Palworld Dedicated Server On Ubuntu 22.04

How to Set up a Palworld Dedicated Server On an Ubuntu 22.04 Host (VM or baremetal)

WORK IN PROGRESS

Because the documentation scattered around the internet is pretty inconsistent, I'm putting everything I've found that seems to work together here.

Overview

This took too much effort to get sorted out, so I'm documenting everything figured out so far here.

@troyfontaine
troyfontaine / mcserver_upgrade.sh
Created January 13, 2025 15:00
Minecraft Bedrock Upgrade Script
#!/usr/bin/env bash
###############################################################################
# Minecraft Bedrock Server Update Script
#
# Intended to be used on Linux with a dedicated Bedrock Minecraft Server
#
# NOT COMPATIBLE WITH JAVA EDITION
#
# This script is intended to be used only in the following installation scenario