Skip to content

Instantly share code, notes, and snippets.

View AasSuhendar's full-sized avatar
🎯
Focusing

Aas Suhendar AasSuhendar

🎯
Focusing
View GitHub Profile
@AasSuhendar
AasSuhendar / format-partition.sh
Created December 22, 2024 04:54
Script for Format Partition that have installed LVM
#!/bin/bash
# Script to format /dev/sdb by removing LVM and creating a new filesystem.
# WARNING: This script will DELETE ALL DATA on /dev/sdb.
DEVICE="/dev/sdb"
PARTITION="${DEVICE}1"
# Function to check and ensure the script is run as root.
check_root() {

5 Steps for Creating Templates and Virtual Machines on Proxmox using Linux Distro's Cloud Images

This tutorial guides you through the process of creating Templates and Virtual Machines on Proxmox using cloud-based images from various Linux distributions. We provide clear instructions for Alma Linux 9, Amazon Linux 2, CentOS 9, Fedora 38, Oracle Linux 9, RHEL 9, Rocky Linux 9, and Ubuntu 23.04 Lynx Lobster.

Note: The instructions have been tested on Proxmox 8.0.4.

Let's begin by choosing the cloud-based image. If you already have your preferred Linux distribution, skip to the 1st step.

To assist in making informed choices when selecting a Linux distribution for your virtual machines, we've compiled a table showcasing key characteristics of each cloud image. This table provides a snapshot of important attributes, including kernel version, Python version, number of processes initialized after boot, number of packages installed, free memory after boot, VM disk size, root partition disk size, used size on t

@AasSuhendar
AasSuhendar / basic-package-debian.sh
Last active June 23, 2024 16:33
Basic Package Installation Debian
#!/bin/bash -e
# Current Directory
CURRENT_DIR=$(pwd)
# Check Privileges
if [[ $UID -ne 0 ]]; then
echo "Administrator Privilege Needed. Please run as An Administrator/Root User!"
exit 1
fi
@AasSuhendar
AasSuhendar / CKAD.md
Created June 6, 2024 16:47 — forked from veggiemonk/CKAD.md
CKAD exam preparation
@AasSuhendar
AasSuhendar / kafka-cheat-sheet.md
Created March 23, 2023 03:03 — forked from ursuad/kafka-cheat-sheet.md
Quick command reference for Apache Kafka

Kafka Topics

List existing topics

bin/kafka-topics.sh --zookeeper localhost:2181 --list

Describe a topic

bin/kafka-topics.sh --zookeeper localhost:2181 --describe --topic mytopic

Purge a topic

bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic mytopic --config retention.ms=1000

... wait a minute ...

@AasSuhendar
AasSuhendar / sources.list
Created January 31, 2023 13:56 — forked from ishad0w/sources.list
Debian 10 (Buster) -- Full sources.list
deb http://deb.debian.org/debian buster main contrib non-free
deb-src http://deb.debian.org/debian buster main contrib non-free
deb http://deb.debian.org/debian buster-updates main contrib non-free
deb-src http://deb.debian.org/debian buster-updates main contrib non-free
deb http://deb.debian.org/debian buster-backports main contrib non-free
deb-src http://deb.debian.org/debian buster-backports main contrib non-free
deb http://security.debian.org/debian-security/ buster/updates main contrib non-free
@AasSuhendar
AasSuhendar / MacOS-Multi-Version-Go-With-Homebrew.md
Created November 29, 2022 09:11 — forked from BigOokie/MacOS-Multi-Version-Go-With-Homebrew.md
Manage multiple versins of Go on MacOS with Homebrew

This process would likely apply to other Homebrew formula also.

First search for your desired package:

brew search go

You should get a list of results that include the below. Not "go" is very unspecific so you may get a lot of results:

@AasSuhendar
AasSuhendar / new_disk_zfs_raid_0.md
Created September 15, 2022 02:29 — forked from CMCDragonkai/new_disk_zfs_raid_0.md
Adding a new disk ZFS RAID-0 #zfs

Adding a new disk ZFS RAID-0

When adding a new disk to ZFS RAID-0, you must ensure that the disk has the same storage size as the other disks.

You will need the gptfdisk package to use sgdisk.

hdd='/dev/disk/by-id/<DISKNAME>'
zpool labelclear -f "$hdd" || true
sgdisk --zap-all "$hdd"
@AasSuhendar
AasSuhendar / ovs-cheat.md
Created July 29, 2022 01:56 — forked from djoreilly/ovs-cheat.md
OVS cheat sheet

DB

ovs-vsctl list open_vswitch
ovs-vsctl list interface
ovs-vsctl list interface vxlan-ac000344
ovs-vsctl --columns=options list interface vxlan-ac000344
ovs-vsctl --columns=ofport,name list Interface
ovs-vsctl --columns=ofport,name --format=table list Interface
ovs-vsctl -f csv --no-heading --columns=_uuid list controller
ovs-vsctl -f csv --no-heading -d bare --columns=other_config list port
@AasSuhendar
AasSuhendar / enable-luks-howto
Created February 11, 2022 03:02 — forked from huyanhvn/enable-luks-howto
Enable LUKS disk encryption with a key file
# Create strong LUKS key
openssl genrsa -out /root/luks.key 4096
chmod 400 /root/luks.key
# Fill random data to the device
shred -v --iterations=1 /dev/xvdb
# Format device
echo "YES" | cryptsetup luksFormat /dev/xvdb --key-file /root/luks.key