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
*.so |
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/sh | |
# post-commit hook for etckeeper | |
set -e | |
[email protected] | |
hostname=$(hostname -f) | |
git format-patch -1 --subject-prefix="etckeeper ${hostname}" --stdout | safe-mail $recipients |
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/sh | |
for bdev in $(blkid -o device); do | |
if [ ! -b "${bdev}" ]; then | |
echo >&2 "Not a block device: ${bdev}" | |
continue | |
fi | |
uuid=$(blkid -o value -s UUID -- "${bdev}") | |
# echo "Found UUID '${uuid}' for '${bdev}'" | |
# block device names hopefully don't contain special shit -.- |
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 | |
# crontab entry: | |
# */10 * * * * /usr/local/sbin/monitor-systemd.sh --cron | |
tmpdir=$(mktemp --tmpdir -d systemd-monitor-XXXXXXX) | |
trap 'rm -rf "${tmpdir}"' EXIT | |
sendmail=0 | |
if [ "$1" == "--cron" ]; then |
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 | |
tmpdir=$(mktemp --tmpdir -d smime-build-msg-XXXXXXX) | |
trap 'rm -rf "${tmpdir}"' EXIT | |
cd "${tmpdir}" | |
debug_show() { |
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 ruby | |
require 'rotp' | |
require 'uri' | |
require 'cgi' | |
otpuri = STDIN.readline | |
otpuri = URI(otpuri) | |
if otpuri.scheme != "otpauth" |
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 | |
# align port range to 2^n start and 2^n-1 size for smallest n | |
# call: rangealign.sh a-b | |
a=${1%-*} | |
b=${1##*-} | |
dist=$((b-a)) | |
n=2 | |
while [ $dist -ge $((2**n)) ]; do | |
((++n)); |
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
# route balancing only in commercial edition... | |
#map $cookie_JESSIONID $route_cookie1 { | |
# ~.+\.(?P<route>\w+)$ $route; | |
#} | |
#map $cookie_jsessionid $route_cookie2 { | |
# ~.+\.(?P<route>\w+)$ $route; | |
#} | |
#map $request_uri $route_uri1 { | |
# ~JSESSIONID=.+\.(?P<route>\w+)$ $route; | |
#} |
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/sh | |
# Find model names current PPDs were installed from | |
set -e | |
tmpdir=$(mktemp --tmpdir -d cups-ppd-source-XXXXXXX) | |
trap 'rm -rf "${tmpdir}"' EXIT | |
ppd_updater () { |
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 | |
# REQUIRES | |
# - bash | |
# - gnutls "certtool" | |
# - perl | |
# - awk | |
set -e | |
set -o pipefail |