Skip to content

Instantly share code, notes, and snippets.

@dubcl
dubcl / bridge_and_bonding_examples.md
Created February 20, 2020 19:53
bridge and bonding examples

bridge

auto br1
iface br1 inet manual
   bridge_ports eth1
   bridge_stp on
   bridge_fd 0.0
@dubcl
dubcl / exclude-server-status.conf
Created January 3, 2020 21:43
Exclude server status request from Apache log
# Copy to /etc/apache2/conf.d
# Add env=!log_exclude after log type on vhost config
SetEnvIf Request_URI "/server-status/?auto" log_exclude
@dubcl
dubcl / gist:c8b6a3151b2432edc8861fc0f389b80a
Created November 26, 2019 20:01
Avoid SSL_ERROR_BAD_MAC_ALERT on Firefox
SSL_ERROR_BAD_MAC_ALERT
Preference Name Value
security.tls.insecure_fallback_hosts IP.OR.URL
Then Ctrl+F5
@dubcl
dubcl / cloneall.sh
Created June 12, 2019 14:51 — forked from potter0815/cloneall.sh
clone all private repos of an organization
#!/bin/bash
#requires jq -> http://stedolan.github.io/jq/
#optional change working_dir
working_dir=${1-$(pwd)}
cd $working_dir
user="github_username"
token="application token"
organization="Organization_Name"
@dubcl
dubcl / node_exporter_systemd_config.md
Last active April 3, 2023 22:27
node_exporter systemd config
@dubcl
dubcl / coredump.md
Created March 4, 2019 18:15
coredump config
@dubcl
dubcl / node_exporter.default
Last active February 8, 2019 15:39 — forked from eloo/node_exporter.default
Init.d script for prometheus node exporter
# Set the command-line arguments to pass to the server.
ARGS='--collector.diskstats.ignored-devices="^(ram|loop|fd)\\d+$"'
# Prometheus-node-exporter supports the following options:
# --collector.diskstats.ignored-devices="^(ram|loop|fd|(h|s|v|xv)d[a-z])\\d+$": Regexp of devices to ignore for diskstats.
# --collector.filesystem.ignored-mount-points="^/(sys|proc|dev)($|/)": Regexp of mount points to ignore for filesystem collector.
# --collector.ipvs.procfs="/proc": procfs mountpoint.
# --collector.megacli.command="megacli": Command to run megacli.
# --collector.ntp.server="": NTP server to use for ntp collector.
# --collector.textfile.directory="": Directory to read text files with metrics from.
@dubcl
dubcl / go_apache2.sh
Created February 4, 2019 14:35
goaccess for apache2
goaccess access.log --log-format='%h %v %^[%d:%t %^] "%r" %s %b "%R" "%u"' --date-format='%d/%b/%Y' --time-format=%T --enable-panel=REFERRERS --enable-panel=KEYPHRASES -q -a > foo-report.html
@dubcl
dubcl / rsync_parallel.sh
Created January 21, 2019 14:28 — forked from rcoup/rsync_parallel.sh
Parallel-ise an rsync transfer when you want multiple concurrent transfers happening,
#!/bin/bash
set -e
# Usage:
# rsync_parallel.sh [--parallel=N] [rsync args...]
#
# Options:
# --parallel=N Use N parallel processes for transfer. Defaults to 10.
#
# Notes:
@dubcl
dubcl / mysql_netdata.md
Last active December 17, 2018 17:08
Enable Mysql monitoring on Netdata

Verify all paths

service netdata stop

apt-get install python-mysqldb
ln -s /usr/lib/netdata/conf.d/python.d/mysql.conf /etc/netdata/python.d/mysql.conf
echo "mysql=force" >> /etc/netdata/charts.d.conf