You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Instantly share code, notes, and snippets.
Troy Fontaine
troyfontaine
Troy is a DevOps Engineer, in his spare time he is a Docker and Raspberry Pi enthusiast.
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
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
Install the required packages
sudo apt-get install -y smartmontools unzip curl
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)
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!
Open Armoury Crate
On the left nav, click on the "Device" tab, then select your keyboard from the list
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
Now, click in the box that says "Click her then press the key."
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
Click on the .> key in the Armoury Crate Window, then on the right side of the Window, toggle the drop down
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
Power button (this should be a momentary switch type)
Power LED (for me, this was actually built into the power button)
330K Ohm resistor (this is connected between the LED and the 3.3v header
A Real Time Clock (RTC) Module (preferably, one with built-in pull up resistors)
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.
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
On your existing controller, Navigate to Settings -> Backup and download a settings only backup. This is CRITICAL because trying to import
Running Badblocks on External USB Drives attached to a TrueNAS Scale Machine
Badblocks on TrueNAS Scale
Connect your USB drive to the machine
Navigate to the TrueNAS Scale shell by opening the menu, going to System Settings and then clicking on Shell
Locate the drive's device ID using the lsblk command
Check the recommended block size using the command blockdev --getbsz /dev/<YOUR BLOCK DEVICE ID>
Note the block size you got from the last command
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!
Okay, you've confirmed there is no data on the drive you need? Good!