Skip to content

Instantly share code, notes, and snippets.

@Vudubond
Vudubond / 10GbNIC.md
Created October 30, 2024 09:05 — forked from fschiettecatte/10GbNIC.md
10Gb NIC on RHEL / AlmaLinux / Rocky / EuroLinux / CentOS 8

10Gb NIC on RHEL / AlmaLinux / Rocky / EuroLinux / CentOS 8

I have an AQC107 10Gb NIC installed in my PC running AlmaLinux 8. AlmaLinux 8 supports the card well enough but I found that a number of network settings need to be changed to get the best performance.

The driver is included in AlmaLinux 8 but you may want to install the current release which you can download from Marvell. Installation instructions for the driver are included in the download.

@Vudubond
Vudubond / HighTrafficServerSettings.md
Created October 30, 2024 09:05 — forked from fschiettecatte/HighTrafficServerSettings.md
High Traffic Server Settings on RHEL / AlmaLinux / Rocky / EuroLinux / CentOS 8

High Traffic Server Settings on RHEL / AlmaLinux / Rocky / EuroLinux / CentOS 8

I recently did some work to optimize the network configuration of an AlmaLinux 8 based web server that receives a lot of traffic.

Of course these settings also apply to RHEL / Rocky / EuroLinux / CentOS 8 (hereafter referred to as Linux 8.) I think these should also work on RHEL / AlmaLinux / Rocky / EuroLinux 9 as well but I have not yet tested them.

There is a lot of information on the web for this and it distills down to a minimum recommended configuration, and a recommended configuration.

The minimum recommended configuration should be sufficient for servers with less than 10Gb, and the recommended configuration should be sufficient for servers with 10Gb or more.

@Vudubond
Vudubond / AnyDesk-Reset.cmd
Created October 8, 2024 09:54 — forked from janasco/AnyDesk-Reset.cmd
AnyDesk Reset
@echo off & setlocal enableextensions
title Reset AnyDesk
reg query HKEY_USERS\S-1-5-19 >NUL || (echo Please Run as administrator.& pause >NUL&exit)
chcp 437
call :stop_any
del /f "%ALLUSERSPROFILE%\AnyDesk\service.conf"
del /f "%APPDATA%\AnyDesk\service.conf"
copy /y "%APPDATA%\AnyDesk\user.conf" "%temp%\"
rd /s /q "%temp%\thumbnails" 2>NUL
xcopy /c /e /h /r /y /i /k "%APPDATA%\AnyDesk\thumbnails" "%temp%\thumbnails"
@Vudubond
Vudubond / search-modification.php
Created April 22, 2024 10:58 — forked from dingo-d/search-modification.php
WordPress search modification. Read the description!
<?php
/**
* Modification of the default WordPress search
*
* By default, the WordPress search is very rigid. It checks the post table's
* title, content and excerpt with a '%LIKE%' keyword. So the search is very
* limited.
* This will modify the search clause and do a fulltext search. For more information
* about fulltext you can read about it here: https://www.digitalocean.com/community/tutorials/how-to-improve-database-searches-with-full-text-search-in-mysql-5-6-on-ubuntu-16-04
*
#!/usr/bin/perl
#Name: find_centos8_needs_elrepo.pl
#version: 1.0.0
#Date: 2020-03-10
#Author: David Mathog
#
# list any ElRepo drivers needed to install CentOS 8 on this system
#
# assumes wget, lspci, and access to the internet are both available
# If access is not available specify one parameter to the already downloaded
@Vudubond
Vudubond / database.sh
Created November 29, 2022 12:18
Frequent MySQL/MariaDB operations
MySQL Operations
--------------------------------------
In this document:
- Export/Import DB
- Export/Import Table from DB
- mysqladmin
- Repair DB
--------------------------------------
@Vudubond
Vudubond / imapsync-cpanel-to-gmail.sh
Created August 11, 2022 13:16 — forked from Hellyna/imapsync-cpanel-to-gmail.sh
IMAPSync cPanel to GMail
#!/usr/bin/env bash
src_host=''
src_port='993'
src_username=''
src_password=''
dest_host='imap.gmail.com'
dest_port='993'
dest_username=''
@Vudubond
Vudubond / cspheader.php
Created May 11, 2022 10:56 — forked from phpdave/cspheader.php
CSP Header for PHP or Apache or .htaccess - Content Security Protocol
<?
//CSP only works in modern browsers Chrome 25+, Firefox 23+, Safari 7+
$headerCSP = "Content-Security-Policy:".
"connect-src 'self' ;". // XMLHttpRequest (AJAX request), WebSocket or EventSource.
"default-src 'self';". // Default policy for loading html elements
"frame-ancestors 'self' ;". //allow parent framing - this one blocks click jacking and ui redress
"frame-src 'none';". // vaid sources for frames
"media-src 'self' *.example.com;". // vaid sources for media (audio and video html tags src)
"object-src 'none'; ". // valid object embed and applet tags src
"report-uri https://example.com/violationReportForCSP.php;". //A URL that will get raw json data in post that lets you know what was violated and blocked
@Vudubond
Vudubond / traffic-control.sh
Created April 13, 2022 07:32 — forked from ole1986/traffic-control.sh
Traffic control script for incoming and outgoing packages using TC (on a specific ip address)
#!/bin/bash
VERSION="1.0.2"
# Interface connect to out lan
INTERFACE="eth0"
# Interface virtual for incomming traffic
VIRTUAL="ifb0"
# set the direction (1 = outgoing only, 2 = incoming only 3 = both)
DIRECTION=3
# Speed
@Vudubond
Vudubond / magento2-disable-unused-modules.sh
Created February 18, 2022 15:14 — forked from ppcdias/magento2-disable-unused-modules.sh
Magento 2.4 Disable Unused Modules to Increase Performance
# magento 2 disable unused modules
bin/magento module:disable Vertex_AddressValidation
bin/magento module:disable Vertex_AddressValidationApi
bin/magento module:disable Vertex_Tax
bin/magento module:disable Temando_ShippingRemover
bin/magento module:disable Dotdigitalgroup_Chat
bin/magento module:disable Dotdigitalgroup_Email