Skip to content

Instantly share code, notes, and snippets.

View troyfontaine's full-sized avatar

Troy Fontaine troyfontaine

View GitHub Profile
@troyfontaine
troyfontaine / palworld-dedicated-server-setup.md
Last active February 14, 2024 01:49
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 / README.md
Last active March 11, 2024 08:29
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 / asus-falchion-nx-key-combinations.md
Last active September 4, 2023 18:22
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 / falchion-nx-remap-left-alt-left-windows-keys.md
Last active December 31, 2023 06:54
How to Remap Left-Alt and Left-Windows keys on the ASUS ROG Falchion NX (Mac Style Key Layout)

How to Remap the Left-Alt and Left-Windows keys on the ASUS ROG Falchion NX (Mac Style Key Layout)

Because remapping can confuse the keyboard, we have to temporarily reprogram two keys outside of the left Windows and Left Alt keys that we're trying to work with in order to get the keys swapped like we want. It would be nice if the Armour Crate software would provide a way to specify a known key rather than having us type it-but c'est la vie!

  1. Open Armoury Crate
  2. On the left nav, click on the "Device" tab, then select your keyboard from the list
  3. Click on the ?/ key in the Armoury Crate Window, then on the right side of the Window, toggle the drop down from Default to Keyboard Function
  4. Now, click in the box that says "Click her then press the key."
  5. Hold down the right Alt key on your keyboard and press the left Alt key, you will now see that the ?/ key is set to Left Alt
  6. Click on the .> key in the Armoury Crate Window, then on the right side of the Window, toggle the drop down
@troyfontaine
troyfontaine / serverspec_rspec_cheatsheet.md
Last active September 3, 2023 15:42 — forked from mearns/serverspec_rspec_cheatsheet.html
A cheat sheet for server spec and rspec

Serverspec and RSpec Cheat Sheet

Setup

Initialize a serverspec directory with boilerplate

serverspec-init
@troyfontaine
troyfontaine / 1-raspberry_pi_with_led_powerbutton_and_rtc.md
Last active July 17, 2023 21:59
Raspberry Pi with LED Power Button and RTC

How to Set up a Raspberry Pi with LED Power Button and RTC

After a lot of trial and error, I've figured out how to set up a Raspberry Pi (in my case, I tested with a 2B and 3B+, this may not work on a Pi 4B). This involves using the i2c0 bus (which normally isn't recommended), but this is what I was able to get working as re-mapping would communicate with the RTC via i2c, but the overlay for the RTC wouldn't adjust its configuration when told to use i2c3 or higher.

Required hardware

  1. Power button (this should be a momentary switch type)
  2. Power LED (for me, this was actually built into the power button)
  3. 330K Ohm resistor (this is connected between the LED and the 3.3v header
  4. A Real Time Clock (RTC) Module (preferably, one with built-in pull up resistors)
  5. Jumper wires
@troyfontaine
troyfontaine / README.md
Created April 12, 2022 03:16
Rsync commands for TrueNAS

Rsync Commands for use with TrueNAS

Due to the way TrueNAS is built-duplicating files using Rsync requires some special flags to allow it to work

The below example command has been used and verified as working with TrueNAS Scale

rsync -avrh -A --no-perms <SOURCE> <DESTINATION>
@troyfontaine
troyfontaine / README.md
Created April 3, 2022 05:06
Migrating Unifi Controller from Cloudkey Gen 1 to Docker Container

How to Migrate a Unifi Controller from Cloudkey Gen 1 to Docker Container

Background: In an effort to streamline my local network and reduce the number of dedicated devices, I began an effort to move off of my Unifi Cloudkey Gen 1 to a Docker Container. While the migration should be straight forward-it is definitely not!

Before we begin, ensure that your existing Cloudkey is still connected to the network and operational. This is crucial to migrate the existing settings and to leverage the Unifi migration tooling for a site to save on having to wipe your configuration and rebuild everything from scratch.

  1. Launch your container (it is up to you to follow the documentation for the specific maintainer's flavour to ensure you avoid data loss!) Once you can access the set up screen (on TCP:8443) for the containerized controller, you can proceed to Step 2
  2. On your existing controller, Navigate to Settings -> Backup and download a settings only backup. This is CRITICAL because trying to import
@troyfontaine
troyfontaine / README.md
Last active March 24, 2022 13:59
Running Badblocks on External USB Drives attached to a TrueNAS Scale Machine

Badblocks on TrueNAS Scale

  1. Connect your USB drive to the machine
  2. Navigate to the TrueNAS Scale shell by opening the menu, going to System Settings and then clicking on Shell
  3. Locate the drive's device ID using the lsblk command
  4. Check the recommended block size using the command blockdev --getbsz /dev/<YOUR BLOCK DEVICE ID>
  5. Note the block size you got from the last command
  6. STOP! Have you ensured that the USB device does NOT have any important data on it? If it does, stop now, unplug it from the TrueNAS Scale machine and back it up elsewhere! Running the specific badblocks command we'll use will destroy data on the drive!
  7. Okay, you've confirmed there is no data on the drive you need? Good!
  8. Fire up a new tmux session tmux new -s badblocks_
@troyfontaine
troyfontaine / README.md
Created March 19, 2022 14:45
Resize Ubuntu VM Disk on TrueNAS Scale

Resize an Ubuntu VM Disk on TrueNAS Scale

  1. Shutdown the target VM
  2. Locate the zvol where the storage is allocated in the Storage blade in the TrueNAS Scale Web UI
  3. Resize the zvol by editing it-this can ONLY be increased, not shrunk!
  4. Save your changes
  5. Start your target VM up again
  6. Log in to the VM
  7. Execute the growpart command, ie. sudo growpart /dev/vda 2
  8. Execute the resize2fs command, ie. sudo resize2fs /dev/vda2