Skip to content

Instantly share code, notes, and snippets.

# CentOS-Base.repo
#
# This file uses a new mirrorlist system developed by Lance Davis for CentOS.
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
@dubcl
dubcl / multipath_hp.conf
Last active February 19, 2024 21:14
Multipath HP P2000 Config
# Example config for P2000 G3
defaults {
polling_interval 5
path_selector "round-robin 0"
user_friendly_names yes
path_checker directio
}
blacklist {
# avoid multipath configure local disks
# apt-get install ifenslave
# echo "alias bond0 bonding" > /etc/modprobe.d/alias-bond.conf
source /etc/network/interfaces.d/*
auto lo
iface lo inet loopback
auto eth0
allow-hotplug eth0
Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0" 0 0
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
EndSection
Section "Files"
EndSection
#!/bin/bash
# apt-get install freerdp-x11
# OLD WAY
#
# For windows 7/10
# xfreerdp --plugin cliprdr -a 16 -g 1920x1065 -k 0x0000080A --disable-wallpaper --no-nla -u $USER $IP
xfreerdp --plugin cliprdr -a 16 -g 1270x940 -k 0x0000080A --disable-wallpaper --no-tls --no-nla $1
#!/bin/bash
#
# Compress bak files from qbiz server
# and delete files older than 30 days
#
# Carlos Albornoz <[email protected]>
DIR=/opt/backup
cd $DIR
for FILE in $(ls *.bak);
@dubcl
dubcl / megacli.md
Last active January 21, 2025 08:00
megacli command guide
/etc/udev/rules.d/60-ssd-scheduler.rules
# set deadline scheduler for non-rotating disks
ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="deadline"
@dubcl
dubcl / nf_conntrack_max
Last active May 22, 2017 15:53
conntrack
cat /proc/sys/net/netfilter/nf_conntrack_max
apt-get install libnetfilter-conntrack3
echo "nf_conntrack" >> /etc/modules
modprobe nf_conntrack
echo 524288 > /proc/sys/net/netfilter/nf_conntrack_max
echo "net.netfilter.nf_conntrack_max = 524288" >> /etc/sysctl.conf
sysctl -p
sleep 2