Skip to content

Instantly share code, notes, and snippets.

View jesussuarz's full-sized avatar
🌀
Verified

Jesus Suarez jesussuarz

🌀
Verified
View GitHub Profile
@jesussuarz
jesussuarz / guide_to_install_vmware_tools_on_linux_and_windows.md
Last active January 9, 2025 06:22
Guide to Install VMware Tools on Linux and Windows

Guide to Install VMware Tools on Linux and Windows

For Linux (Ubuntu/Debian-based Distributions)

  1. Update the system repositories:
sudo apt update
  1. Install Open VMware Tools:

Install ISO VMWare ESXi 8 U3 via KVM in OVH Servers

I hope this helps you all!

I’m the only one who has managed to solve this issue, and so far, no one else has posted about it. That’s why I’ll be the first to share the correct solution because I’ve successfully done it.

To keep using ESXi, the first thing you need is an ISO that includes the correct drivers. I’ve prepared an ISO specifically optimized for OVH servers.

The ISO is: ESXi-8.0U3sb-24262298-nvme-usbnic

@jesussuarz
jesussuarz / Get-WindowsKey.ps1
Created November 24, 2024 07:48
Guide: Using the Get-WindowsKey PowerShell Script on Windows Server 2025
function Get-WindowsKey {
$Path = "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion"
$DigitalProductId = (Get-ItemProperty -Path $Path).DigitalProductId
$ProductKey = ""
$KeyOffset = 52
$Chars = "BCDFGHJKMPQRTVWXY2346789"
for ($i = 0; $i -lt 25; $i++) {
$Current = 0
for ($j = 14; $j -ge 0; $j--) {
$Current = $Current * 256 -bxor $DigitalProductId[$KeyOffset + $j]
@jesussuarz
jesussuarz / Koha_16.05_to_22.04_Migration_Guide.md
Created August 22, 2024 06:55
Migration Guide for Koha 16.05 from Ubuntu 14.04.6 LTS to Ubuntu 22.04 LTS

Migration Guide for Koha 16.05 from Ubuntu 14.04.6 LTS to Ubuntu 22.04 LTS

This guide will help you migrate a Koha 16.05 instance from an older Ubuntu 14.04.6 LTS server to a new Ubuntu 22.04 LTS server. The instance will be named "koha16".

Prerequisites:

  1. Ensure you have a backup of your Koha database and configuration files.
  2. Verify the availability of all required dependencies and packages on the new server.
  3. Have root or sudo access on both the old and new servers.

Step 1: Prepare the Old Server

@jesussuarz
jesussuarz / Passbolt-Migration-Guide.md
Last active September 9, 2024 15:04
Guide to Migrating Passbolt Server to a New Server

Guide to Migrating Passbolt Server to a New Server

This guide covers two important aspects:

  1. Migrating a Passbolt server from an old server to a new one, even if the new server has a more updated operating system.
  2. Converting a Passbolt Pro installation to a Community (CE) version.

The process described is applicable both for a new installation and for an update on the existing server. In my case, I migrated from CentOS 7 to AlmaLinux 9.4.

Old Server

First, create a backup of the files and database of your old Passbolt server. To do this, execute:

@jesussuarz
jesussuarz / 01_rate-limiting-advanced-ok.md
Last active December 16, 2024 17:00
Rate-Limiting-Advanced-OK Plugin for Kong

Screenshot_124

Reference: https://docs.konghq.com/hub/kong-inc/rate-limiting-advanced/

Overview

The rate-limiting-advanced-ok plugin is designed to provide enhanced rate limiting capabilities to services managed by Kong API Gateway. This plugin extends the basic rate limiting features by offering more granular control over rate limits based on a variety of criteria including IP, consumer, credential, and more. It supports both sliding and fixed window types for flexibility in how rate limits are enforced.

NOTE: The code was rewritten based on the original "rate-limiting-advanced" on May 27, 2024.

@jesussuarz
jesussuarz / set_db_privileges_cpanel_whm_api.md
Last active July 29, 2024 22:57
Set DB privileges cPanel/WHM API

MySQL User Privilege Management Script

Description

This Python script automates the process of setting MySQL database privileges for users managed under a cPanel/WHM environment. It leverages the cPanel's UAPI and WHM API to modify database privileges based on a predefined list of users. The script is particularly useful for system administrators who need to manage database access rights efficiently across multiple users.

Features

  • List Accounts: Retrieves all cPanel accounts using the WHM API.
  • List Databases and Users: For each cPanel account, it lists all associated MySQL databases and the users who have access to them.
@jesussuarz
jesussuarz / SSH-Dynamic-Port-and-Security-Setup.md
Last active May 5, 2024 04:03
Advanced SSH Configuration Script for Dynamic Port Assignment and Enhanced Security

Advanced SSH Configuration Script for Dynamic Port Assignment and Enhanced Security

Introduction:

This Bash script automates the configuration of SSH services on Oracle Linux 8.9, including dynamic port assignment based on IP address input, SELinux and firewall adjustments, and SSH key pair generation with enhanced security measures.

Functionality:

The script starts by verifying the presence of an IP address as input. It then parses the IP address to construct a unique SSH port number based on predefined rules: the port number starts with a '6', followed by the first digit of the first IP octet, and the last digits of the remaining three octets.

Key Features:

The script provided is a Bash shell script designed to compute an SSH port number based on a specific set of rules applied to an input IP address. Here's a detailed description of how the script works and what it's designed to do:

Script Description:

The purpose of this Bash script is to dynamically calculate a port number for SSH connections based on a unique format derived from an IP address. The script takes a single IP address as an input argument and processes it to generate a custom SSH port. The custom port number is constructed following these rules:

  • The first digit of the port is always '6'.
  • The second digit is taken from the first digit of the first octet of the IP address.
  • The next three digits are composed of the last digit from each of the three remaining octets of the IP address.

This method ensures that each IP address is likely to correspond to a unique port number, facilitating distinct SSH configurations for different servers or devices identified by their IP addresses.

@jesussuarz
jesussuarz / How to Retrieve Secret Credentials from Jenkins for Docker Registry.md
Last active March 19, 2024 23:49
How to Retrieve Secret Credentials from Jenkins for Docker Registry

How to Retrieve Secret Credentials from Jenkins for Docker Registry

First off, I want to state that what I'm about to describe isn't lawful. If you need access to secret credentials, you should request them from your administrator. I am not responsible for any misuse of this information.

Understanding Our Goal

The aim is to obtain secret keys for Docker registry repositories accessible from a pipeline.

The Problem

When a pipeline runs, Docker registry credentials aren't exposed in the output. This is a security measure; credentials are replaced with asterisks, like so: