Skip to content

Instantly share code, notes, and snippets.

View iptoux's full-sized avatar

Maik Damm iptoux

View GitHub Profile
@iptoux
iptoux / cbin.py
Last active May 26, 2022 21:17
Integer to binary
#!/usr/bin/env python3
# The convert function
def cbin(z):
# Set an array of bits
bits = [128,64,32,16,8,4,2,1]
# Placeholder for output
r = ""
@iptoux
iptoux / ip2bin.py
Last active April 21, 2023 21:47
Ip to binary converter
#!/usr/bin/env python3
import cbin.py
# Convert function
def ipTobin(ip):
# Split the ip adress
ip = ip.split('.')
# Set variable to hold binary output
b = ''
@iptoux
iptoux / .gitignore
Created September 27, 2022 11:35
Default .gitignore for MKDEV
# ignore node/grunt dependency directories
node_modules/
creds.js
# Ignore /build directory.
/build
# ignore composer vendor directory
/vendor
@iptoux
iptoux / unbound-install.sh
Last active February 6, 2023 22:15
Unbound automatic bash install script for proxmox
#!/bin/bash
n='([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'
m='([0-9]|[12][0-9]|3[012])'
echo -n "Updating repos: "
apt -q update &> /dev/null
echo "done"
echo -n "Updating system: "
@iptoux
iptoux / send2flux.sh
Last active February 21, 2023 23:55
pshitt content (json) to influxdb 2
#!/bin/bash
#
# User Pass IP PORT TIME SW CIPHER MAC TRY
# CMD call: send2flux.sh root lol 10.10.3.103 2222 3422323232 openssl shdgetw 12:32:FF:34:76 1
#
# You can set fix variables here, script will set
# environment variables if available.
#
### PLEASE EDIT YOUR SETTINGS HERE ###

Proxmox VE Installation on Hetzner Server via Rescue System

Follow these steps to install Proxmox VE on a Hetzner server via the Rescue System. The Rescue System is a Linux-based environment that can be booted into to perform system recovery tasks. We'll be using it to install Proxmox VE.

In order to complete the process, it is indeed necessary to first boot into the Rescue System and then connect to it via SSH. This will allow you to run the commands for installing Proxmox VE. Here are the steps:

Starting the Rescue System

  1. Log into the Hetzner Robot.
  2. Under "Main Functions; Server" select the desired server and then open the tab "Rescue".
@iptoux
iptoux / query_activedirectory.py
Created October 17, 2023 19:09 — forked from DiegoQueiroz/query_activedirectory.py
Python-LDAP Query Active Directory Example (with paged results to prevent ldap.SIZELIMIT_EXCEEDED exception)
# -*- coding: utf-8 -*-
# requires python-ldap (usually pip install python-ldap)
# But this package requires OpenLDAP libraries, so it is a pain to install it on Windows.
# So, if you're on Windows, I recomment to use pre-compiled binaries with this command (virtualenv supported):
# pip install https://download.lfd.uci.edu/pythonlibs/h2ufg7oq/python_ldap-3.1.0-cp37-cp37m-win_amd64.whl
import ldap
from ldap.controls import SimplePagedResultsControl
@iptoux
iptoux / pxe_on_opnsense.md
Created October 17, 2023 19:39 — forked from azhang/pxe_on_opnsense.md
PXE on OPNsense

This is a walkthrough of setting up a PXE server to boot Ubuntu server live install .iso over network, all on an OPNsense device. No need for Dnsmasq or http/nfs server! Should be compatible with vanilla FreeBSD and HardenedBSD devices as well.

Guide made with OPNsense 20.7 and Ubuntu 20.04.2, with the assumption that your OPNsense device is at 192.168.1.1.

Thanks to all the other guides out there. 1 2

Notes:

A couple issues I ran into with other guides is that Ubuntu's servers return 404 for older releases. Make sure to check each link used in this guide to make sure they exist! This guide works with BIOS as we use pxelinux.0 but it can be adapted fairly easily for UEFI boot.

Overview:

@iptoux
iptoux / main.py
Last active November 28, 2023 21:08
SLX_Logging - A Stand alone Logger class (wip)
from slx_logging import SLX_Logging
def main():
# Init Logger
log = SLX_Logging(__name__, logging.INFO)
log.enableConsole(colores=False, detailed=True)
log.enableFileLog(detailed=True, logger_filename="logfile.log", logger_format = None,
logger_format_datefmt = None, logger_rotation = False, logger_maxBytes=2000, logger_backupCount=10)
# Print log message
@iptoux
iptoux / compose.yml
Created March 1, 2024 21:59
Docker Compose of Ollma + OpenWebui
version: "3"
services:
open-webui:
image: ghcr.io/open-webui/open-webui:main
container_name: open-webui
restart: always
extra_hosts:
- "host.docker.internal:host-gateway"
ports:
- "3000:8080"