Skip to content

Instantly share code, notes, and snippets.

View Mstaaravin's full-sized avatar

Mstaaravin Mstaaravin

View GitHub Profile
@Mstaaravin
Mstaaravin / libvirt_template.xml
Created October 7, 2025 11:46
libvirt_template.xml
<sysinfo type='smbios'>
<bios>
<entry name='vendor'>LENOVO</entry>
<entry name='version'>M49KT21A</entry>
<entry name='date'>01/03/2023</entry>
</bios>
<system>
<entry name='manufacturer'>LENOVO</entry>
<entry name='product'>11SYS02J00</entry>
<entry name='version'>ThinkCentre neo 50s Gen 3</entry>
@Mstaaravin
Mstaaravin / VIRT.esxi8a.xml
Last active September 17, 2025 20:45
VIRT.esxi8a.xml
<!--
WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE
OVERWRITTEN AND LOST. Changes to this xml configuration should be made using:
virsh edit VIRT.esxi8a
or other application using the libvirt API.
-->
<domain type='kvm'>
<name>VIRT.esxi8a</name>
<uuid>016ad945-de0a-4264-8c78-0d04935d31ab</uuid>
@Mstaaravin
Mstaaravin / passbolt_compose.yml
Last active July 26, 2025 17:57
passbolt docker compose.yml
---
services:
passboltdb:
image: library/mariadb:10.3
container_name: passboltdb
hostname: passboltdb
networks:
homelab:
environment:
@Mstaaravin
Mstaaravin / claude_instructions.md
Created July 5, 2025 18:56
claude_instructions.md

Project Instructions Template v1.0.0

1. General Configuration

Language & Communication

  • Response Language: Spanish (all responses must be in Spanish)
  • Code Comments: English (for ansible playbooks, scripts, configuration files, etc.)
  • Documentation: English (README.md and other .md files)
  • Commit Messages: English (when required)
@Mstaaravin
Mstaaravin / zfs_install_debian_12.txt
Last active August 22, 2025 19:12
ZFS Install on Debian 12
# add contrib non-free to /etc/apt/sources.list
# deb http://deb.debian.org/debian/ bookworm main contrib non-free non-free-firmware
mokutil --sb-state
apt install -y linux-headers-$(uname -r) zfsutils-linux zfs-dkms zfs-zed
modprobe zfs
zfs --version
dkms status zfs
@Mstaaravin
Mstaaravin / google_takeout_timestamp_photo_organizer.sh
Last active March 18, 2025 13:55
A bash script that copies media files from exported Takeout Google Photos to a new location while setting their modification dates based on filenames or directory structure.
#!/bin/bash
# Script to copy specific media files (IMG*.jpg, VID*.mp4, Screenshot*.png) to a target directory
# and set their modification times based on various date patterns while avoiding duplicates
# Check if destination directory is provided
if [ $# -ne 1 ]; then
echo "Usage: $0 <target_directory>"
exit 1
fi
@Mstaaravin
Mstaaravin / fiobench.sh
Last active August 18, 2024 22:26
Disk benchmark with fio
#!/bin/bash
# Global variables
OUTPUT_UNIT="MB/s"
FILE_SIZE="20g"
BLOCK_SIZE="16k"
RUNTIME="60"
TEST_FILE="$PWD/fio_test_file"
IODEPTH="32"
NUMJOBS="4"
@Mstaaravin
Mstaaravin / iozonebenchmark.sh
Created August 17, 2024 23:02
IOzone benchmark disk
#!/bin/bash
# Global variables for output unit and IOzone parameters
OUTPUT_UNIT="MB/s"
FILE_SIZE="4G"
RECORD_SIZE_MIN="4k"
RECORD_SIZE_MAX="16M"
TEST_TYPES="-a -i 0 -i 1 -i 2"
TEST_FILE="$PWD/iozone_test_file"
ITERATIONS=3
network:
version: 2
renderer: networkd
ethernets:
eth0:
dhcp4: false
dhcp6: false
eth1:
#!/bin/sh
# https://devtidbits.com/2015/11/30/add-to-and-change-ubuntus-motd/
printf " $(tput -T xterm bold)Name:$(tput -T xterm sgr0) $(hostname)\n"
printf " $(tput -T xterm bold)Role:$(tput -T xterm sgr0) {{ ROLE }}\n"
printf "\n"
printf " $(tput -T xterm bold)Services running on this server:\n$(tput -T xterm sgr0)"
printf " $(tput -T xterm bold)$(tput -T xterm setaf 6)awswatcher$(tput -T xterm sgr0) this service checks uploads from {{ ENV }}admin.domain.net on folder /home/{{ ENV }}{{ ROLE }}/api/public/media/uploads\"\n"
printf "\n"