Skip to content

Instantly share code, notes, and snippets.

View ingmarioalberto's full-sized avatar

SysAdminMarioAlberto ingmarioalberto

View GitHub Profile
@ingmarioalberto
ingmarioalberto / gist:9f804c04895263cd71c4f344d87b41a4
Created June 13, 2023 17:26
Install driver RTL88x2BU via dkms
Another option would be to install drivers from Cilynx's GitHub repo for RTL88x2BU drivers.
As detailed in the repo, you can install the drivers using DKMS installation method:
cd rtl88x2bu
VER=$(sed -n 's/\PACKAGE_VERSION="\(.*\)"/\1/p' dkms.conf)
sudo rsync -rvhP ./ /usr/src/rtl88x2bu-${VER}
sudo dkms add -m rtl88x2bu -v ${VER}
El Haproxy no la hace de jamón si hay otra instancia de haproxy previamente ejecutandose... WTF
@ingmarioalberto
ingmarioalberto / gist:bd4d59a33df7c181d768cff6bea6aeb0
Created May 8, 2023 21:23
Access ARGV inside funcions [bash]
#!/bin/bash
set | grep BASH_ARGV
echo ${BASH_ARGV[0]}
@ingmarioalberto
ingmarioalberto / gist:db5b4981c49e6ab5d414295ace1bed7f
Created April 6, 2023 16:30
awk print column > certain value
PP=20; df -PH /var/log | tail -n1 | awk "\$5 > $PP {print ;}" | grep -e '^.*' 1>/dev/null 2>/dev/null && echo OVER || echo UNDER
Download:
https://olivier.sessink.nl/jailkit/index.html#download
o bien: https://software.virtualmin.com/vm/6/gpl/rhel/8/x86_64/jailkit-2.23-1.el8.vm.x86_64.rpm
Then:
Create jail dir:
mkdir /home/jail && chown root:root /home/jail
Initialize the jail with some commands like ssh, and group of utilities like basicshell,
this command copy system files to jail directory, if you want to "hardlink" instead use -k
jk_init -v -j /home/jail basicshell editors extendedshell netutils ssh sftp scp
@ingmarioalberto
ingmarioalberto / gist:e72a3df85a809c52a0296a7ecadb7aff
Created March 22, 2023 18:16
subscription-manager refresh shows a Traceback and "Error updating system data on the server" check: /var/log/rhsm/rhsm.log etc
Something lik:
Traceback (most recent call last):
File "/sbin/subscription-manager", line 9, in <module>
load_entry_point('subscription-manager==1.24.26', 'console_scripts', 'subscription-manager')()
File "/usr/lib64/python2.7/site-packages/subscription_manager/scripts/subscription_manager.py", line 86, in main
return managercli.ManagerCLI().main()
File "/usr/lib64/python2.7/site-packages/subscription_manager/managercli.py", line 2989, in main
ret = CLI.main(self)
File "/usr/lib64/python2.7/site-packages/subscription_manager/cli.py", line 183, in main
return cmd.main()
zdump -v America/Mexico_City | grep $(date +"%Y")
America/Mexico_City Sun Apr 4 07:59:59 2021 UT = Sun Apr 4 01:59:59 2021 CST isdst=0 gmtoff=-21600
America/Mexico_City Sun Apr 4 08:00:00 2021 UT = Sun Apr 4 03:00:00 2021 CDT isdst=1 gmtoff=-18000
America/Mexico_City Sun Oct 31 06:59:59 2021 UT = Sun Oct 31 01:59:59 2021 CDT isdst=1 gmtoff=-18000
America/Mexico_City Sun Oct 31 07:00:00 2021 UT = Sun Oct 31 01:00:00 2021 CST isdst=0 gmtoff=-21600
-------------------
To remove DST settings you have to know your time shift and reverse it, so for example
for America/Mexico_City being it: -6
```
# rm -f /etc/localtime && ln -s /usr/share/zoneinfo/Etc/GMT+6 /etc/localtime
@ingmarioalberto
ingmarioalberto / gist:69049495f6c1a619f1718002aafcd6c2
Created December 31, 2022 07:34
todo... nagios ILO monitor
curl --location --insecure -u xxx:yyyy --silent --connect-timeout 10 X GET "https://10.1.1.1/redfish/v1/Systems/1/" | jq '.["Oem"]["Hpe"]["AggregateHealthStatus"]'
>>
{
"AgentlessManagementService": "Ready",
"BiosOrHardwareHealth": {
"Status": {
"Health": "OK"
}
},
"FanRedundancy": "Redundant",
@ingmarioalberto
ingmarioalberto / gist:dc5b78c3a49d0b51d1d82beece82c945
Created November 18, 2022 00:33
nmtui allow manage ethernet ubuntu (device is strictly unmanaged)
Append except:type:ethernet at the end of the line unmanaged-devices...etc
systemctl restart NetworkManager
https://developers.facebook.com/docs/whatsapp/on-premises/overview
BSP: Business Solution Provider
WhatsApp Business Platform On-Premises API
Requirements:
- Display name:
1. how to set it up: https://www.facebook.com/business/help/338047025165344/
2. the formatting guidelines: https://www.facebook.com/business/help/757569725593362
3. updating it: https://www.facebook.com/business/help/378834799515077