Skip to content

Instantly share code, notes, and snippets.

View aelek73's full-sized avatar

Akos Elek aelek73

  • Szeged, Hungary
  • 14:48 (UTC +01:00)
View GitHub Profile
@aelek73
aelek73 / kube-for-home.md
Last active July 31, 2024 17:45
Build Kubernetes cluster in Proxmox VE

Build Kubernetes cluster in Proxmox VE

Currently environment

This guide has been made in Proxmox 7.2, which is the free, Debian-based hypervisor with Qemu, LXC, and ZFS. I use it in the Lenovo M700 machine. For the storage, I use 3 empty disks.

The destination

  • Kubernetes cluster with containerd
  • 3 master for high availability
@aelek73
aelek73 / crontab_all_user.md
Last active May 18, 2021 07:27
List all cron jobs for all user
for user in $(cut -f1 -d: /etc/passwd); do crontab -u $user -l; done
@aelek73
aelek73 / wget_full_path.md
Last active May 10, 2021 10:41
wget - print downloaded file full path
wget -P /destination_folder/ example.com 2>&1 | awk '/‘.*saved/{ print $6 }' | sed -e 's/\‘//g' -e 's/\’//g'

Output

/destination_folder/index.html
@aelek73
aelek73 / crypty.py
Last active April 23, 2021 13:42
Basic file encryptor and decryptor with pyaescrypt module
#!/usr/bin/env python3
import pyAesCrypt
import argparse
import getpass
def encrypt(filename, password, bufferSize):
pyAesCrypt.encryptFile(str(filename), str(filename+".crypted"), password, bufferSize)
def decrypt(filename, password, bufferSize):
@aelek73
aelek73 / generator.py
Created March 17, 2021 12:40
ISC DHCP config generator
#!/usr/bin/env python3
# Create 'ips.csv' file with '<IP-ADDRESS>,<MAC-ADDRESS>,<HOSTNAME>' lines
# Example:
#
# ips.csv:
# 192.168.1.1,ac:eg:ik:12:34:56,MyPC1
# 192.168.1.2,bd:fh:jl:67:89:01,MyPC2
#
# Set network specific values (subnet, netmask, range, etc.)
@aelek73
aelek73 / telegrambot.py
Last active March 14, 2021 21:05
Simple Telegram sender in Python3
import requests
def telegramBotSendtext(msg):
# For get botToken use the official telegram BotFather.
botToken = ''
# For get botChatID send the message to the bot and check https://api.telegram.org/bot<YOUR-TOKEN>/getUpdates and grep ID from id key
botChatID = ''
@aelek73
aelek73 / wimip.md
Last active February 3, 2021 17:32
What is my IP from terminal

What is my IP from terminal

Setup

  1. Add alias to .bashrc or .zshrc
    alias wimip="wget -qO - icanhazip.com"
  1. Restart terminal or run source ~/.bashrc / source ~/.zshrc
  2. Use it
 wimip