Skip to content

Instantly share code, notes, and snippets.

View Flagro's full-sized avatar
🦙
Attention is all I need

Anton Potapov Flagro

🦙
Attention is all I need
View GitHub Profile
@Flagro
Flagro / kubernetes_ubuntu_extensions.sh
Last active March 4, 2024 19:35
Kubernetes bare metal setup for easy use outside of cloud (on VPS)
# Install helm
curl https://baltocdn.com/helm/signing.asc | gpg --dearmor | sudo tee /usr/share/keyrings/helm.gpg > /dev/null
sudo apt-get install apt-transport-https --yes
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/helm.gpg] https://baltocdn.com/helm/stable/debian/ all main" | sudo tee /etc/apt/sources.list.d/helm-stable-debian.list
sudo apt-get update
sudo apt-get install helm
# Install Traefik
helm repo add traefik https://traefik.github.io/charts
helm repo update
@Flagro
Flagro / kubeadm_ubuntu.sh
Last active November 11, 2024 13:54
Single Node Kubernetes (K8s) v1.29 Cluster Installation on Ubuntu 22.04 LTS
# Installation of kubeadm cluster on Ubuntu 22.04 that I personally use on my ubuntu VPS machines to deploy pods via github actions
# 1. Disable swap:
sudo swapoff -a
sudo sed -i '/ swap / s/^\(.*\)$/#\1/g' /etc/fstab
# 2. Test the ports:
# On the server: nc -l 6443
# On the local machine: nc x.x.x.x 6443
@Flagro
Flagro / fsnotify_recursive_watcher.go
Last active January 8, 2024 13:44
The implementation of recursive fsntify directory watcher that i used in my https://github.com/Flagro/ProjectTextAgent project. Implements a composite class and utilizes the goroutines and channels.
package watcher
import (
"log"
"os"
"path/filepath"
"github.com/fsnotify/fsnotify"
)