Skip to content

Instantly share code, notes, and snippets.

View Vitexus's full-sized avatar
🤖
Coding as usual

Cybervitexus Vitexus

🤖
Coding as usual
View GitHub Profile
@aw
aw / explain.md
Last active September 5, 2025 20:41
[SOLVED] Proxmox VE and cloud-init snippets etc

Proxmox VE 6.x release includes a feature to add custom cloud-init configs. Unfortunately there is poor documentation, so I had to figure this out by adding pieces of information together.

The custom cloud-init files (user-data, meta-data, network-config)

The cloud-init files need to be stored in a snippet. This is not very well documented:

  1. Go to Storage View -> Storage -> Add -> Directory
  2. Give it an ID such as snippets, and specify any path on your host such as /snippets
  3. Under Content choose Snippets and de-select Disk image (optional)
  4. Upload (scp/rsync/whatever) your user-data, meta-data, network-config files to your proxmox server in /snippets/snippets/ (the directory should be there if you followed steps 1-3)
@cherts
cherts / zabbix_sender.sh
Created November 15, 2019 11:36
Zabbix-sender on bash
#!/bin/ash
help="Usage: zabbix_sender.sh <-z zabbix server> [-p server port] [-s host name] <-k key name> <-o key value>"
while getopts "z:p:s:k:o:h" c; do
case $c in
z)z=${OPTARG};;
p)p=${OPTARG};;
s)s=${OPTARG};;
k)k=${OPTARG};;
o)o=${OPTARG};;
h)echo $help;exit 0;;
@G-UK
G-UK / Debootstrap Debian Arm64 OS for Raspberry Pi 3 & 4.md
Last active July 27, 2025 02:03
Build a 64bit Debian OS for the Raspberry Pi using Debootstrap

Introduction

The objective of these instructions is to create a complete Arm64 OS (Userland and Kernel) using Debian Debootstrap and RPI-Update for use on the Raspberry Pi 3 and 4.

Prerequisites:

  • An existing Debian/Raspbian system (any architecture will do)
  • An empty SD card formatted as per a standard Raspbian installation mounted to /mnt/sd on the build system
    • 1st Partition 0-256MB = FAT32 (Mount to /mnt/sd/boot)
    • 2nd Partition 256MB+ = EXT4 (Mount to /mnt/sd)

Set-up basic Debian system

@abdennour
abdennour / README.md
Last active August 25, 2025 18:31
Nginx Reverse Proxy for Nexus Docker Registries

Overview

This is a solution of a common problem with Nexus Docker repositories. The administrator has to expose port for "pull", another port for "push", other ports for each hosted repository. This solution is about leveraging Nginx reverse proxy to avoid using these ports.

How it works ?

Given :

  • Nexus hostname is "nexus.example.com"
  • Nexus web port is 8081
@Tomucha
Tomucha / mocny_async.dart
Created April 3, 2019 09:36
Jak tohle vubec muze fungovat ... ale funguje.
Future<bool> muzemePokracovat() async {
List problemy = await rest("/problemy").get();
return problemy.isEmpty || await app.confirm('Ignorovat nalezene problemy?");
}
@influentcoder
influentcoder / create-debian-package-python.md
Created March 22, 2019 01:28
Creating a Debian package from scrath for a Python library
@Tamal
Tamal / git-ssh-error-fix.sh
Last active September 8, 2025 15:18
Solution for 'ssh: connect to host github.com port 22: Connection timed out' error
$ git clone [email protected]:xxxxx/xxxx.git my-awesome-proj
Cloning into 'my-awesome-proj'...
ssh: connect to host github.com port 22: Connection timed out
fatal: Could not read from remote repository.
$ # This should also timeout
$ ssh -T [email protected]
ssh: connect to host github.com port 22: Connection timed out
$ # but this might work
@wapiflapi
wapiflapi / pxe.sh
Created October 31, 2018 20:00
Quick and dirty PXE boot server.
#!/bin/bash
mkdir -p /tmp/tftp
wget https://boot.netboot.xyz/ipxe/netboot.xyz.efi -O /tmp/tftp/netboot.xyz.efi
# /!\ Make sure the router is OK.
ROUTER=$(ip r | grep default | cut -d ' ' -f3)
# Make sure interface is the right one,
# and dhcp-range should be a subset of the real range.
class CrashLoopDetection:
def __init__(self, kubernetes_client=None):
self.kubernetes_client = kubernetes_client or client
def getpodstatus(self, pod):
return pod.status.phase
def run(self, **kwargs):
name = kwargs.get('name')
def test_kubernetes_pod_status_is_running(k8s_client):
podlist = k8s_client.list_namespaced_pod("default")
# Iterate through all the pods in the default namespace and verify that they are Running
for item in podlist.items:
pod = k8s_client.read_namespaced_pod_status(namespace='default', name=item.metadata.name)
print("%s\t%s\t" % (item.metadata.name, item.metadata.namespace))