This file contains hidden or 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 bash | |
| available () { | |
| command -v $1 >/dev/null 2>&1 | |
| } | |
| # Make sure we have wget or curl | |
| if available wget; then | |
| SILENT_DL="wget -qO-" | |
| LOUD_DL="wget" |
This file contains hidden or 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/python | |
| import bs4 as BeautifulSoup | |
| import collections | |
| import os | |
| import os.path | |
| import requests | |
| import shutil | |
| import subprocess | |
| import sys |
This file contains hidden or 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 | |
| # | |
| # this script will rename the user $1 on the system to $2 | |
| # | |
| # Rename will be done by low-level substitution in the following files: | |
| # /etc/passwd,/etc/shadow,/etc/group,/etc/gshadow,/etc/sudoers,/etc/sudoers.d | |
| # ... and additionally the homedir will be renamed. | |
| fail() | |
| { |
This file contains hidden or 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 | |
| # | |
| # IMPORTANT! | |
| # At the moment this script is forged only for Debian ( tested on 8.x release ). | |
| # Although my efforts were put on building this also on Arch Linux or Alpine, at the moment only Debian seems to be able to build it. | |
| # Also, not sure why these instructions where nowhere on the internet, therefore I leave them here for whoever need them. | |
| # | |
| ########### | |
| # Add Backports repo support |
This file contains hidden or 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/perl | |
| # | |
| # Brad's el-ghetto do-our-storage-stacks-lie?-script | |
| # | |
| sub usage { | |
| die <<'END'; | |
| Usage: diskchecker.pl -s <server[:port]> verify <file> | |
| diskchecker.pl -s <server[:port]> create <file> <size_in_MB> | |
| diskchecker.pl -l [port] |
This file contains hidden or 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 -e -u -o pipefail | |
| declare -A containers | |
| declare -A paths | |
| [[ -r /etc/default/docker_wrapper ]] && . /etc/default/docker_wrapper | |
| callname="${0##*/}" |
This file contains hidden or 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 -e -u -o pipefail | |
| declare -A containers | |
| declare -A paths | |
| [[ -r /etc/default/docker_wrapper ]] && . /etc/default/docker_wrapper | |
| callname="${0##*/}" |
This file contains hidden or 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 | |
| DEBUG=false | |
| prefix= | |
| preamble_printed= | |
| PREAMBLE() { | |
| [ "$preamble_printed" != 1 ] || return 0 | |
| cat << EOF |
This file contains hidden or 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
| { | |
| "annotations": { | |
| "list": [ | |
| { | |
| "builtIn": 1, | |
| "datasource": "-- Grafana --", | |
| "enable": true, | |
| "hide": true, | |
| "iconColor": "rgba(0, 211, 255, 1)", | |
| "name": "Annotations & Alerts", |
This file contains hidden or 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
| TS="$(date +%s.%3N)" | |
| output_statistics() { | |
| cat <<EOT | |
| # HELP node_birdlg_lastpolldate_sec Last polling date of the lsb_info script | |
| # TYPE node_birdlg_lastpolldate_sec counter | |
| # HELP node_birdlg_lastpollduration_sec Duration of the lsb_info script | |
| # TYPE node_birdlg_lastpollduration_sec gauge | |
| EOT |
OlderNewer