# Tech

# Gadgets

* [reTerminal](https://www.seeedstudio.com/ReTerminal-with-CM4-p-4904.html)

# Encryption

## Software

* [age](https://github.com/FiloSottile/age) - a simple, modern and secure file encryption tool, format, and Go library

# Smart Phones

## Android Resources

* [Lineage 18.x Samsung Device Capatibility](https://rootmygalaxy.net/lineage-os-18-update-details/)

# Home Lab

# Resources

## VMs

* [proxmox](https://www.proxmox.com/en/)

## Containers

* [Nomad](https://www.nomadproject.io/)
* [Kubernetes](https://kubernetes.io/)
* [Docker](https://www.docker.com/)
	* [portainer.io](https://www.portainer.io/) (web UI for docker)

## NAS

* [TrueNAS Core](https://www.truenas.com/truenas-core/)

## Task Scheduling

* [Airflow](https://airflow.apache.org/)

# PiKVM

## Gotchas

- Make sure to double check your CIDR rule when establishing a static IP. Does `/24` really mean what you think it means?
- If you are planning on using WiFi make sure to buy the external antenna
- In order for keyboard capture to work correctly you need to run Chrome in app mode

## PiKVM v4 Mini

# Services

### RSS Aggregator / Reader

[Miniflux - Minimalist and Opinionated Feed Reader](https://miniflux.app/) + [Reeder 5 (reederapp.com)](https://reederapp.com/)

# Handling Power Loss

## UPSes

- [OLS3000ERT2UA - Smart App UPS Systems | CyberPower](https://www.cyberpower.com/global/en/product/sku/ols3000ert2ua)

## Articles

- [Network UPS Tools (NUT) Ultimate Guide | Techno Tim](https://technotim.live/posts/NUT-server-guide/)

## Strategies

### Turn Off Devices too Stupid to Turn Themselves Off

#### UniFi Devices

From NUT Server sshpass to server `ubnt-systool poweroff`

# NextDNS

- How to install NextDNS on Unifi Dream Machine Pro: [https://github.com/nextdns/nextdns/wiki/UnifiOS](https://github.com/nextdns/nextdns/wiki/UnifiOS)

# eGPUs

### Discussions

- Powering 4 OCuLink to PCIe x16 Adapters without 4 PSUs - [https://egpu.io/forums/custom-egpu-chassis/powering-4-oculink-to-pcie-x16-adapters-without-4-psus/#post-1116472](https://egpu.io/forums/custom-egpu-chassis/powering-4-oculink-to-pcie-x16-adapters-without-4-psus/#post-1116472)
    - [https://www.reddit.com/r/eGPU/comments/1dir8p0/multiple\_oculink\_adapters\_one\_psu/](https://www.reddit.com/r/eGPU/comments/1dir8p0/multiple_oculink_adapters_one_psu/)
- 

### Oculink

#### Parts

- PCIe 4.0 F9G 64Gbps OcuLink Laptop External Graphics Card GPU Docking Station for M.2 NVMe to SFF-8612 OcuLink eGPU Adapter Card: [https://www.aliexpress.us/item/3256807955790836.html](https://www.aliexpress.us/item/3256807955790836.html)
- Oculink 64Gbps Transfer External Graphics Dock EG01 G38 GPU Dock Straight Elbow Cable 8Pin Connector ATX 800w Power Supply - [https://www.aliexpress.us/item/3256807326757194.html](https://www.aliexpress.us/item/3256807326757194.html)
- 

### Thunderbolt 4/USB-C 4

#### Parts

- ADT UT3G V1.6 External GPU Adapter - USB4 to PCIe 4.0 x16 eGPU for Thunderbolt 4/3 Perfect for NUC, ITX, STX Laptops Gaming PCs - [https://www.aliexpress.us/item/3256807420487972.html](https://www.aliexpress.us/item/3256807420487972.html)
- 

# Exterior PoE

- Enclosure Outdoor Network POE, Telco: 2 Ports. Dimensions Inside: 5 x 4 x 2-inch - [https://www.data-alliance.net/enclosure-outdoor-network-poe-telco-2-ports.-dimensions-inside-5-x-4-x-2-inch/](https://www.data-alliance.net/enclosure-outdoor-network-poe-telco-2-ports.-dimensions-inside-5-x-4-x-2-inch/)
- Sealing Putty (Dum Dum) - [https://www.hobartparts.com/sealing-putty-dum-dum-0p--571878](https://www.hobartparts.com/sealing-putty-dum-dum-0p--571878)
- 

# AI Rig

### Hardware

- **Power Supplies:**
    - 2 x Corsair HX1500i Fully Modular Ultra-Low Noise ATX Power Supply
    - BQZYX+ ADD2PSU 4 in 1 Power Supply Connector (power adapter PSU connector to turn on and off the two power supplies at the same time)
- **Motherboard:** Minisforum BD790i
- **CPU:** AMD Ryzen 9 7945HX 5.4 GHz - 16 Cores 32 Threads (built into motherboard)
- **RAM:** Crucial 5600 96GB Kit
- **Case:** Veddha 6 GPU Miner Case Aluminum
- **Storage:** Crucial T705 2TB Gen 5 NVME
- **GPUs:**
    - 2 x ZOTAC GAMING GeForce RTX 3090 Trinity OC
    - 2 x EVGA GeForce RTX 3090 FTW3 ULTRA
- **PCIe Adapter:** ADT-Link F3312A-Q4S (PCIe 4.0 x16 FFC graphics card extension supports one-to-four split)
- **Network Adapter:** 2.5Gbps Realtek NIC (built into motherboard)
- **Cooling:**
    - 5 x Noctua NF-A12x25
    - 1 x Noctua NF-A12x15
    - 1 x CORSAIR iCUE COMMANDER CORE XT Smart RGB Lighting and Fan Speed Controller
- **Remote Management:** JetKVM with ATX Module

### Limit TDP on RTX 3090s

#### 1. Check Current Power Limits:  


- Use the command `nvidia-smi -q -d POWER` to see the current power limit settings.
- This will show you the current power limit, maximum power limit, and other power-related information.

#### 2. Set a New Power Limit:

- Use the command `sudo nvidia-smi -i <GPU_ID> -pl <POWER_LIMIT_IN_WATTS>` to set a new power limit.
- Replace `<GPU_ID>` with the ID of the GPU you want to modify (e.g., 0 for the first GPU).
- Replace `<POWER_LIMIT_IN_WATTS>` with the desired power limit in watts (e.g., 250 for 250W).
- Example: `sudo nvidia-smi -i 0 -pl 250`

Persistence: To make the power limit persistent across reboots, you'll need to create a custom `systemd `service or script that runs this command on startup.

#### 3. Verify the Settings:

- After setting the power limit, use the command `nvidia-smi -q -d POWER` again to verify that the new power limit has been applied.
- Check the output to ensure that the "Current Power Limit" reflects the value you set.

#### 4. Persist the Power Limit on Boot  


Create a `systemd `service:

```
sudo nano /etc/systemd/system/nvidia-power-limit.service
```

Paste this:

```
[Unit]
Description=Set NVIDIA GPU Power Limit
After=multi-user.target

[Service]
Type=oneshot
ExecStart=/usr/bin/nvidia-smi -i 0 -pl 300
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target
```

Enable it:

```
sudo systemctl enable nvidia-power-limit.service
sudo systemctl start nvidia-power-limit.service
```

# Mobile Home Lab

### Resources

- [https://github.com/mozanunal/llm-tools-kiwix](https://github.com/mozanunal/llm-tools-kiwix) - Expose offline Kiwix ZIM archives (like Wikipedia, Stack Exchange, DevDocs) to Large Language Models (LLMs) via the LLM CLI tool and Python library. This plugin allows LLMs to search and read content from your local ZIM files.
- [https://github.com/jojo2357/kiwix-zim-updater](https://github.com/jojo2357/kiwix-zim-updater) - A script to check `download.kiwix.org` for updates to your local ZIM library.
-

# Self-Host the Internet

## Resources

- Internet in a Box 
    - [Internet in a Box - Mandela's Library of Alexandria (internet-in-a-box.org)](https://internet-in-a-box.org/)
    - [Internet in a Box (iiab.io)](https://wiki.iiab.io/go/Main_Page) - Wiki
- [Explore Offline Wikipedia and Educational Content with Kiwix- Kiwix](https://kiwix.org/en/) - Browse ZIM files
- [HTTrack Website Copier - Free Software Offline Browser (GNU GPL)](https://www.httrack.com/) - It allows you to download a World Wide Web site from the Internet to a local directory

## Videos

- [self-host the INTERNET! (before it's too late) (youtube.com)](https://www.youtube.com/watch?v=OC67FoXVRPE)
- [Easily Build Your Own Offline Internet: Maps, Cloud Storage, Kiwix, LMS &amp; More with Raspberry Pi - YouTube](https://www.youtube.com/watch?v=javfG88cZB0)
- 

# Linux

# Mounting APFS Partition on Linux

**Original Version:** [https://www.baeldung.com/linux/apfs-partition-mount](https://www.baeldung.com/linux/apfs-partition-mount)

## apfs-fuse

### Installation

We’ll need to compile the driver from source. For that reason, we’ll need to download and install the dependencies first. So, let’s go ahead and install them using a package manager.

On Debian, Ubuntu, and Debian-based derivatives, we can use [*apt*](https://www.baeldung.com/linux/yum-and-apt#apt-advanced-packaging-tool):

```bash
$ sudo apt install fuse libfuse3-dev bzip2 libbz2-dev cmake gcc g++ git libattr1-dev zlib1g-dev
```

Similarly, we can use [*yum*](https://www.baeldung.com/linux/yum-and-apt#yum-yellowdog-updater-modified) for Fedora and RHEL distributions:

```bash
$ sudo apt install fuse fuse3 bzip2 cmake gcc g++ git libattr zlib
```

Next, let’s clone the repository into an empty directory:

```bash
$ git clone https://github.com/sgan81/apfs-fuse
```

Then, we initialize the submodule:

<div class="code-block code-block-3" id="bkmrk-">  
</div>```bash
$ cd apfs-fuse && git submodule update --init
```

Now, we’re ready to compile the driver:

```
$ mkdir build && cd build && cmake .. && make
```

Alternatively, the driver is also available on the Fedora package repository under the canonical name [*apfs-fuse*](https://packages.fedoraproject.org/pkgs/apfs-fuse/apfs-fuse/).

Once the driver is installed, let’s verify it:

```bash
$ whereis apfs-fuse
apfs-fuse: /usr/bin/apfs-fuse
```

### Mounting APFS Drive

*apfs-fuse* follows the Linux convention for [mounting and unmounting](https://www.baeldung.com/linux/mount-unmount-filesystems) filesystems:

```bash
$ mount <DEVICE> <MOUNT_PATH>
```

With that in mind, let’s mount an APFS drive using the *apfs-fuse* helper:

<div class="code-block code-block-4" id="bkmrk--1">  
</div>```bash
$ apfs-fuse /dev/sdd1 /mnt/apfs-data
```

Similarly, **we can specify the [mount options](https://github.com/sgan81/apfs-fuse#mount-options--o-) using *-o***:

```bash
$ mount -o allowother /dev/sdd1 /mnt/apfs-data
```

### Unmounting APFS Drive

In the same way, we can unmount the partition as root using [*umount*](https://www.baeldung.com/linux/mount-unmount-filesystems#umount):

```bash
$ umount /mnt/apfs-data
```

As a user, we can use the [*fusermount*](https://man7.org/linux/man-pages/man1/fusermount3.1.html) utility:

```bash
$ fusermount -u /mnt/apfs-data
```