This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import datetime | |
import click | |
import requests | |
import xmltodict | |
from openpyxl import load_workbook | |
@click.command() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# apt update && apt install -y braa parallel | |
sysctl -w net.core.rmem_max=26214400 | |
cd /opt/observium | |
braa -d 15000 -p 300 'public'@10.240.0.1-10.240.255.254:.1.3.6.1.2.1.1.5.0 | cut -d ":" -f4 | parallel ./add_device.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "azurerm_key_vault_certificate" "main" { | |
name = "${terraform.workspace}-winrmcert" | |
key_vault_id = var.key_vault_id | |
certificate_policy { | |
issuer_parameters { | |
name = "Self" | |
} | |
key_properties { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LOG_FILE=/root/installer.log | |
exec > >(tee -a ${LOG_FILE} ) | |
exec 2> >(tee -a ${LOG_FILE} >&2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Misc: | |
apt install mc fail2ban htop openvpn git iotop lsof | |
Add to /etc/sysctl.d/70-bufferbloat.conf | |
net.core.default_qdisc=fq | |
net.ipv4.tcp_fastopen=3 | |
net.ipv4.tcp_ecn=1 | |
net.ipv4.tcp_sack=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
XZ_OPT="--threads=4" nohup find . -maxdepth 1 -type d -mtime +1000 -exec tar --remove-files -cJf {}.tar.xz {} \; & |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: Get curl {{curlver}} packages | |
get_url: url={{ item }} dest=/tmp/ | |
with_items: | |
- https://mirror.city-fan.org/ftp/contrib/sysutils/Mirroring/curl-{{ curlver }}-2.0.cf.rhel7.x86_64.rpm | |
- https://mirror.city-fan.org/ftp/contrib/sysutils/Mirroring/libcurl-{{ curlver }}-2.0.cf.rhel7.x86_64.rpm | |
- https://mirror.city-fan.org/ftp/contrib/libraries/libmetalink-0.1.3-9.rhel7.x86_64.rpm | |
- https://mirror.city-fan.org/ftp/contrib/libraries/c-ares-1.15.0-4.0.cf.rhel7.x86_64.rpm | |
- https://mirror.city-fan.org/ftp/contrib/libraries/libssh2-1.9.0-3.0.cf.rhel7.x86_64.rpm | |
- https://mirror.city-fan.org/ftp/contrib/libraries/libidn-1.34-3.0.el7.x86_64.rpm | |
tags: curl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# https://code.luasoftware.com/tutorials/linux/command-line-optimize-image/ | |
find . -type f -iname '*.png' -exec pngquant --skip-if-larger --ext .png --force 256 {} \; | |
find . -type f -iname "*.png" | xargs optipng -o2 -strip all | |
find . -name '*.png' -print0 | xargs -0 -n1 -I{} sh -c 'zopflipng {} output.png; [ -f output.png ] && mv output.png {};' | |
# Using -print0 to deal with spaces | |
find . -print0 -type f -name "*.jpg" -o -name "*.JPG" | xargs -0 jpegoptim |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ping -c4 192.168.1.1 > /dev/null | |
if [ $? != 0 ] | |
then | |
d=`date` | |
echo "$d No network connection, restarting wlan0" >> /var/log/wifimon.txt | |
ifconfig wlan0 down | |
sleep 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git checkout master | |
git merge --squash devel | |
git commit | |
git branch -f devel master | |
git push --all -f |