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
server { | |
listen 80; | |
server_name _; | |
# location /nginx_status { | |
# stub_status on; | |
# access_log off; | |
# } | |
location ~ ^/(static|[^/]+/[^/]+/static)/(.+)$ { |
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/sh | |
### BEGIN INIT INFO | |
# Provides: munin-fastcgi | |
# Required-Start: $remote_fs $syslog $network | |
# Required-Stop: $remote_fs $syslog $network | |
# Should-Start: munin | |
# Should-Stop: munin | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Startup script for Munin CGI services |
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 | |
txt=$(zpool status) | |
condition=$(echo "$txt" | egrep -i '(DEGRADED|FAULTED|OFFLINE|UNAVAIL|REMOVED|FAIL|DESTROYED|corrupt|cannot|unrecover)') | |
if [ "$condition" ]; then | |
echo "$txt" | mail -s "ZFS health failed" alarm.zfs@localhost | |
else | |
echo "$txt" | mail -s "ZFS health ok" info.zfs@localhost | |
fi |
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
@echo off | |
netsh int ipv4 set glob defaultcurhoplimit=65 | |
netsh int ipv6 set glob defaultcurhoplimit=65 |
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
#/lib/systemd/system/node_exporter.service | |
[Unit] | |
Description=Node Exporter | |
After=network.target | |
[Service] | |
User=monituser | |
Group=monituser | |
ExecStart=/opt/node_exporter/node_exporter --collector.textfile.directory /var/lib/node_exporter/textfile_collector |
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
#/lib/systemd/system/raspberrypi_exporter.timer | |
[Unit] | |
Description=Timer for the Raspberry Pi Prometheus exporter | |
[Timer] | |
OnCalendar=*:*:0,10,20,30,40,50 | |
AccuracySec=1sec | |
[Install] |
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
#/lib/systemd/system/raspberrypi_exporter.service | |
[Unit] | |
Description=Prometheus exporter for Raspberry Pi metrics | |
Wants=raspberrypi_exporter.timer | |
[Service] | |
Type=oneshot | |
User=monituser | |
Group=monituser |
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 | |
set -exuo pipefail | |
# Connect USB drive with clean copy of Ubuntu 18.04 image only before run this script!!! | |
sudo sfdisk --list /dev/mmcblk0 | |
sudo sfdisk --list /dev/sda | |
read -p "Press [Enter] key to start modifying partition table..." |
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 osascript -l JavaScript | |
values = ObjC.deepUnwrap($.NSProcessInfo.processInfo.operatingSystemVersion) | |
for (name in values) { | |
console.log(name, values[name]) | |
} |
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
plugin load sos/libsosplugin | |
setsymbolserver https://resources.jetbrains.com/pdb/ | |
setsymbolserver https://msdl.microsoft.com/download/symbols/ | |
setsymbolserver http://symbols.labs.jb.gg/symbols/ | |
loadsymbols |
OlderNewer