Skip to content

Instantly share code, notes, and snippets.

View TheBoroer's full-sized avatar

Boro Vukovic TheBoroer

View GitHub Profile
@TheBoroer
TheBoroer / README.md
Last active March 27, 2025 20:55
Script to manage vCenter SSL certificates from VMware GSS.

vcert

vcert.sh was copied from: https://web.vmware-labs.com/scripts/vcert

Instructions

The following instructions were copied from: https://virtham.us/posts/f/vcert

I got a copy of this program from VMware through an SR when they helped a customer of mine. It is called vCert. This little program is super simple to use and works pretty great. It does everything and anything to do with Certificates on your vCenters. Unfortunately, VMware has not made this public yet. I wish they would.

Sesutil / LEDmon on TrueNAS SCALE

  • Enable dev mode to enable apt: install-dev-tools
  • apt update
  • apt install ledmon
  • ledmon locate=/dev/sdaX (replace sdaX with the failed/failing drive)
@TheBoroer
TheBoroer / postgres user management.sql
Last active June 23, 2024 04:51
Postgres: create db, create user, add user to db
CREATE database database_name_here;
CREATE user username_here with encrypted password 'password_here';
GRANT ALL privileges on database database_name_here to username_here;
@TheBoroer
TheBoroer / README.md
Last active November 26, 2023 05:07
TrueNas SCALE 22.xx: make drive bay LEDs light up when perc is in IT mode (raid disabled and disks managed by OS) on Dell r720XD storage server

UPDATE: doesn't seem like it's possible... truenas/sg_ses doesn't see the enclosure at all when the card is in IT mode. :(

install the sg3-utils package

I installed it via the deb file so that I don't have to mess with restricted apt permissions truenas comes with.

To download: wget http://ftp.de.debian.org/debian/pool/main/s/sg3-utils/sg3-utils_1.45-1_amd64.deb

To install: dpkg -i sg3-utils_1.45-1_amd64.deb

@TheBoroer
TheBoroer / README.md
Created March 25, 2023 05:22
Workaround for docker container issues on Ubuntu 22.04

This started happening with docker v20.10 on ubuntu 22.04. Specifically I had errors like these pop up when trying to run the rancher/agent (for rancher/server v1.6.30):

time="2021-06-29T09:13:28Z" level=fatal msg="Failed to find container id:\n0::/\n" 

Seems to be caused by cgroups v2

To make it work again run: echo 'GRUB_CMDLINE_LINUX=systemd.unified_cgroup_hierarchy=false' > /etc/default/grub.d/cgroup.cfg

@TheBoroer
TheBoroer / commands.sh
Created July 1, 2022 04:33
rsync commands to sync sparse files (vmware thin provisioned vmdk) via SSH
# Update existing sparse files inplace (edit file instead of creating a new file).
rsync -v -z -r --existing --inplace --progress -e ssh /source/path user@host:/destination/path/
# Then sync new sparse files (ignoring existing files we previously updated)
rsync -v -z -r --ignore-existing --sparse --progress -e ssh /source/path user@host:/destination/path/
@TheBoroer
TheBoroer / FusionIO on TrueNAS SCALE.md
Last active January 22, 2025 17:58
Making Fusion-IO devices work on TrueNAS SCALE 22.02.1 and up

FusionIO / Fusion-IO devices on TrueNAS SCALE

WARNING: This is unsupported and has potential to mess your system up. Proceed at your own risk.

Initial instructions were for 22.02.1 but also works for later versions with some additional steps. There's notes for each upgrade I've done at the end of the gist.

Note for v22.02.2:

  • there's a bug where it doesnt show fusionio disks at all under Storage > Disks. So I had to downgrade to 22.02.1 and it works fine.
@TheBoroer
TheBoroer / mac-dev-env-setup.sh
Last active January 10, 2024 18:48
Script to setup a general dev environment on a new mac
# WORK IN PROGRESS
brew update
# Install NVM
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash
# To setup auto 'nvm use' follow instructions for zsh or bash here:
# https://github.com/nvm-sh/nvm#deeper-shell-integration
# Install yarn
npm install --global yarn
@TheBoroer
TheBoroer / ubuntu-vmware-template-prep.sh
Created November 24, 2021 04:06
script to prep a Ubuntu 18.04 or 20.04 fresh install to create a VMware template
# Update your OS packages:
sudo apt-get update
sudo apt-get upgrade -y
# Prevent cloudconfig from preserving the original hostname and reset the hostname:
sudo sed -i 's/preserve_hostname: false/preserve_hostname: true/g' /etc/cloud/cloud.cfg
sudo truncate -s0 /etc/hostname
sudo hostnamectl set-hostname localhost
# Remove the current network configuration:
@TheBoroer
TheBoroer / dnsbl.sh
Created June 25, 2018 14:29 — forked from agarzon/dnsbl.sh
DNS Black List - Linux shell script (improved from: http://www.daemonforums.org/showthread.php?t=302)
#!/bin/sh
# Check if an IP address is listed on one of the following blacklists
# The format is chosen to make it easy to add or delete
# The shell will strip multiple whitespace
BLISTS="
bl.score.senderscore.com
bl.mailspike.net
bl.spameatingmonkey.net
b.barracudacentral.org