Skip to content

Instantly share code, notes, and snippets.

@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
/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 / megacli.md
Last active July 18, 2024 12:41
megacli command guide
#!/bin/bash
#
# Compress bak files from qbiz server
# and delete files older than 30 days
#
# Carlos Albornoz <caralbornozc@gmail.com>
DIR=/opt/backup
cd $DIR
for FILE in $(ls *.bak);
#!/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
Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0" 0 0
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
EndSection
Section "Files"
EndSection
# 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
@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
# 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 / img.mount.sh
Last active September 4, 2017 17:48
mount img
$ sudo fdisk -l image.img
Disk image.img: 1 GiB, 1073741824 bytes, 2097152 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x9ed733a5
Device Boot Start End Sectors Size Id Type
image.img1 2048 2097151 2095104 1023M 83 Linux