Skip to content

Instantly share code, notes, and snippets.

View alkavan's full-sized avatar
😀
sup?

Igal Alkon alkavan

😀
sup?
View GitHub Profile
@alkavan
alkavan / windows-key-retrieval-script.ps1
Created October 4, 2024 08:47
A script to fetch Windows key from system
# Function to retrieve the product key from the registry
function Get-WindowsKey {
try {
$path = 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform'
$key = (Get-ItemProperty -Path $path -Name BackupProductKeyDefault -ErrorAction Stop).BackupProductKeyDefault
return $key
} catch {
return $null
}
}
@alkavan
alkavan / ssh.md
Created June 15, 2024 19:52
Advance SSH usage

SSH and SSH Tunnel Instructions

The secure and correct way to communicate with non-public services on a virtual server machine is via ssh tunnel (services like managment console or a database).

To create a simple ssh tunnel from your host machine to the server on the same port number:

ssh -L 9090:localhost:9090 [email protected]

Rocky Linux 9 - Mail Server Installation

This is a tutorial how to install your own mail server on a Rocky Linux 9 machine.

Initial System Setup

Update system.

dnf update -y
@alkavan
alkavan / minecraft-server-rocky-linux-9.md
Last active October 9, 2024 11:58
Instructions to install Minecraft server on Rocky Linux.

Install Minecraft Server on Rocky Linux 9

Initial System Setup

Update system.

dnf update -y

Set your timezone.

@alkavan
alkavan / install-eggdrop-bot.md
Last active June 3, 2023 20:53
Installation instructions for the Eggdrop IRC bot.

Eggdrop IRC Bot | Install Instructions

Prepare System (as root)

Install required packages for compile:

dnf install -y wget telnet \
  automake gcc make diffutils \
  tcl-devel openssl-devel
@alkavan
alkavan / rocket-rust-web-server-instructions.md
Last active June 2, 2023 19:17
Instructions how to bootstrap a Rocket (Rust) based web application server.

Rust Webserver Framework (Rocket)

Notice: These instructions are for Rocky Linux 9/8, but with small adjustments can be used on any.

Install Rust

Install the crab language (RHEL distributions):

sudo dnf install rust rust-src cargo
@alkavan
alkavan / rocky-linux-9_web-application-server.md
Last active September 23, 2024 06:05
Rocky Linux 9 | Web Application Server

Rocky Linux 9 | Web Application Server Installation

Notice

This cheatsheet assumes the user is knowledgeable about bare installations of virtual private servers on cloud providers and is looking for quick but comprehensive instructions.

Some trivial commands might be missed or skipped.
However, this document can also work as quick tutorial for newcomers to the RHEL eco-system.

Initial System Setup

@alkavan
alkavan / a-rocky-linux-9-llama31-chatbot.md
Last active August 20, 2024 07:33
Rocky Linux 9 server instructions for enthusiastic people who wish to run or train the LLaMA 3.1 models using HuggingFace.

Rocky Linux 9 | Chatbot Edition (Llama 3.1)

The following was tested on Google GCP utilizing an a2-highgpu-1g instance and Rocky Linux 9 image (GCP optimized x86_64).
It has 192 RAM, 48 vCPU cores, and 4 Nvidia L4 24GB GPU attached in grid.
Recommended taking 384GB SSD disk or larger depending on the workload type.

NOTICE: Make sure you have positive bank balance before trying.

Update the system:

@alkavan
alkavan / ctf.cfg
Last active April 8, 2023 07:37
Install IOQUAKE3 on Rocky Linux 9.0
set sv_hostname "BewareSpace Q3 Arena (CTF)"
set sv_maxclients 12
set g_motd "mess with the best, die like the rest."
set g_forcerespawn 10
set g_gametype 4
set bot_minplayers 8
set g_spskill 3
set timelimit 15
set m1 "capturelimit 8; map q3ctf1 ; set nextmap vstr m2"
@alkavan
alkavan / rocky-linux-8_web-application-server.md
Last active June 8, 2024 17:06
Rocky Linux 8 | Web Server

Rocky Linux 8 - Web Application Server Installation Guide

Notice

This cheatsheet assumes the user is knowledgeable about bare installations of virtual private servers on cloud providers and is looking for quick but comprehensive instructions.

Some trivial commands might be missed or skipped.
However, this document can also work as quick tutorial for newcomers to the RHEL eco-system.

Also, I would like to promote Rocky Linux as a solid alternative for enterprise systems. Machines with Rocky Linux are provided by DigitalOcean a great and super stable cloud provider I've been using for years. All the following servers/services can be installed and run stable on a 1CPU/2GB/50GB, 2CPU/2GB/50GB or 2CPU/4GB/50GB droplets (choose by your load).