Skip to content

Instantly share code, notes, and snippets.

@heartshare
heartshare / rke2-ha.md
Created January 28, 2025 18:25 — forked from MarWeUMR/rke2-ha.md
Install RKE2-HA Kubernetes Cluster
@heartshare
heartshare / tailscale-cert-renew.sh
Created January 25, 2025 05:04 — forked from willjasen/tailscale-cert-renew.sh
renews tailscale certificate in proxmox
#!/bin/bash
# taken from https://tailscale.com/kb/1133/proxmox
NAME="$(tailscale status --json | jq '.Self.DNSName | .[:-1]' -r)"
tailscale cert "${NAME}"
pvenode cert set "${NAME}.crt" "${NAME}.key" --force --restart
@heartshare
heartshare / proxmox-cluster-over-tailscale.md
Created January 25, 2025 05:03 — forked from willjasen/proxmox-cluster-over-tailscale.md
Create a Proxmox cluster that communicates over Tailscale

‼️ DANGER ‼️

In the interest of complete transparency, if you follow this guide, there’s a very minuscule but non-zero chance that you may violate the Bekenstein bound, at which the resulting black hole may swallow the earth whole. You have been warned!


⚠️ WARNING ⚠️

  • This guide is for development, testing, and research purposes only. This guide comes with no guarantee or warranty that these steps will work within your environment. Should you attempt within a production environment, any negative outcomes are not the fault of this guide or its author.
  • This guide was tested on Proxmox 8 / Debian 12.
@heartshare
heartshare / proxmox_nvidia.md
Created November 28, 2024 04:08 — forked from egg82/proxmox_nvidia.md
NVidia Proxmox + LXC

Proxmox

Find the proper driver at the NVidia website.

Note: Make sure to select "Linux 64-bit" as your OS

Hit the "Search" button.

@heartshare
heartshare / seaweedfs_owncloud.md
Created November 28, 2024 04:07 — forked from egg82/seaweedfs_owncloud.md
SeaweedFS + OwnCloud

A quick write-up on SeaweedFS + OwnCloud

This guide aims to take a look at a distributed, scalable SeaweedFS as a backend storage for an OwnCloud server. Why not NextCloud? Because NextCloud's S3 connector is outdated and not maintained, and won't work with SeaweedFS. Both OwnCloud and NextCloud have the same support and the same plugins. The only concern anyone has is some weird split that happened between the two years ago. It's fine.

This was a giant pain in the ass, but eventually I got it working. This is how.

Filesystem/Hardware

All servers start from fresh, clean installs of Ubuntu 18.04.3

This guide will use three seperate boxes (one master/OwnCloud and two slaves). I'm assuming there's spare, unformatted disks attached to the slaves. If not, ignore or change the section on mounting to fit your needs.

@heartshare
heartshare / exit_the_cloud.md
Created November 25, 2024 19:27 — forked from rameerez/exit_the_cloud.md
☁️ How I got off the cloud and migrated everything from AWS to a VPS in Hetzner

☁️ How I got off the cloud and migrated everything from AWS to a VPS in Hetzner

This is an opinionated handbook on how I migrated all my Rails apps off the cloud and into VPS.

This is how I manage real production loads for my Rails apps. It assumes:

  • Rails 7+
  • Ruby 3+
  • PostgreSQL
  • Ubuntu Server 24.04
  • Capistrano, Puma, Nginx
@heartshare
heartshare / getPosts.php
Created September 27, 2024 15:04 — forked from chrispian/getPosts.php
Import WordPress posts, categories, and tags to a Laravel table
<?php
/*
* NOTES:
*
* - This was designed for my personal use and could be more robust.
* - Make sure to update the tables you want to import into.
* - Make sure to update the website url you want to import from.
* - Customize as needed. I had very few posts and no media.
*
*/
# SETUP #
DOMAIN=example.com
PROJECT_REPO="[email protected]:example.com/app.git"
AMOUNT_KEEP_RELEASES=5
RELEASE_NAME=$(date +%s--%Y_%m_%d--%H_%M_%S)
RELEASES_DIRECTORY=~/$DOMAIN/releases
DEPLOYMENT_DIRECTORY=$RELEASES_DIRECTORY/$RELEASE_NAME
# stop script on error signal (-e) and undefined variables (-u)
#!/bin/bash
# Define the output file
output_file="combined.md"
# Remove the output file if it exists to avoid including it in the search
if [ -f "$output_file" ]; then
rm "$output_file"
fi
@heartshare
heartshare / mysql_check.sh
Created August 28, 2024 02:58 — forked from rothkj1022/mysql_check.sh
Script for checking and repairing MySQL databases & tables, including corrupted InnoDB tables
#!/bin/bash
# set mysql into innodb recovery mode on startup
mode=1; sed -i "/^\[mysqld\]/{N;s/$/\ninnodb_force_recovery=$mode/}" /etc/my.cnf
# restart mysql
systemctl restart mysqld
# remove recovery mode setting
sed -i '/innodb_force_recovery/d' /etc/my.cnf