Skip to content

Instantly share code, notes, and snippets.

@eldorplus
eldorplus / README.md
Created August 11, 2026 04:39 — forked from linucksrox/README.md
Talos Linux democratic-csi nfs and iscsi with Truenas Scale

How To Deploy

The .yaml file is actually a values file for the Helm chart democratic-csi/democratic-csi

  • Make sure TrueNAS has a dataset nvme2tb/k8s (or update the yaml file)
  • If you're using iSCSI, do the following in TrueNAS:
    • Create a dataset nvme2tb/k8s/iscsi
    • Make sure Block (iSCSI) Shares Targets is running, and click Configure
    • Save the defaults for Target Global Configuration
    • Add a portal on 0.0.0.0:3260
  • Add an Initiator Group, Allow all initiators, and name it something like k8s-talos
@eldorplus
eldorplus / extract-pfx.sh
Created August 27, 2025 10:00 — forked from tomfanning/extract-pfx.sh
Shell script to extract certificate and key files suitable for nginx from a PFX file.
#!/bin/bash
set -e
if [ "$#" -ne 1 ]; then
echo "Usage: $0 filename.pfx" >&2
exit 1;
fi
if [ ! -e "$1" ]; then
echo "File not found: $1" >&2
@eldorplus
eldorplus / 00-update-vault.sh
Created August 24, 2025 12:57 — forked from teamblack-ci/00-update-vault.sh
Let's Encrypt certificate management using Certbot and Vault
#!/bin/sh
#
# Perform certificate updates in Vault.
set -eo pipefail
if ! vault token lookup > /dev/null; then
echo "Login to Vault first."
exit 1
fi
@eldorplus
eldorplus / remove_gitlab_artifacts.sh
Created August 22, 2025 14:55 — forked from carceneaux/remove_gitlab_artifacts.sh
Script for removing GitLab Job Artifacts.
#!/bin/bash
#
# Written by Chris Arceneaux
# GitHub: https://github.com/carceneaux
# Email: carcenea@gmail.com
# Website: http://arsano.ninja
#
# Note: This code is a stop-gap to erase Job Artifacts for a project. I HIGHLY recommend you leverage
# "artifacts:expire_in" in your .gitlab-ci.yml
#

Install Android SDK CLI Ubuntu 20.04 WSL2 (Work in Progress)

Install Java 8

sudo apt update

sudo apt install openjdk-8-jdk-headless
@eldorplus
eldorplus / setup.sh
Created April 20, 2025 09:51 — forked from jjvillavicencio/setup.sh
Install Android SDK on Windows Bash (WSL)
cd /home/<user>/
sudo apt-get install unzip
wget https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip
unzip sdk-tools-linux-4333796.zip -d Android
rm sdk-tools-linux-4333796.zip
sudo apt-get install -y lib32z1 openjdk-8-jdk
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export PATH=$PATH:$JAVA_HOME/bin
printf "\n\nexport JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64\nexport PATH=\$PATH:\$JAVA_HOME/bin" >> ~/.bashrc
cd Android/tools/bin
@eldorplus
eldorplus / socat-forward-tcp4-to-tcp6.sh
Created November 7, 2024 09:40 — forked from drmalex07/socat-forward-tcp4-to-tcp6.sh
Tunnel TCP traffic via socat. #socat
#!/bin/bash
set -e
listen_iface=${1}
listen_port=${2}
target_host=${3}
target_port=${4}
# Check non-empty
[[ -n "${listen_iface}" ]]
@eldorplus
eldorplus / unifi-debian11-install.sh
Created October 29, 2024 14:27 — forked from cloudnull/unifi-debian11-install.sh
Install the latest Unifi Controller on Debian 11
#!/usr/bin/env bash
set -ev
set -o pipefail
# Install dependencies
apt update
apt -y install apt-transport-https ca-certificates wget dirmngr gnupg gnupg2 software-properties-common
# Install old mongo (requried).

Running Unifi Controller in systemd-nspawn with cloud-init

This uses Ubuntu's server cloud image as a stateless container to run the UBNT Unifi Controller software. Configuration data is stored in a directory outside the container. Cloud-init is used to automatically set up the container image, so a new version can be dropped in with minimal effort. This should work with pretty much any modern Linux distro with systemd.

Setup

Systemd-nspawn prefers to store its machines on btrfs, so if your /var/lib/machines is not currently btrfs, you should create one and mount it there. Otherwise it will automatically create an image file at /var/lib/machines.raw and mount it.

Create a device