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 | |
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 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 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 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 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 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 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 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 |
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
Author: Stefan Bühler <stbuehler@web.de> | |
add gcc abi_tag support | |
- parse abi_tag attribute | |
- emit abi tags in name Itanium Mangling (but not for namespaces) | |
- for functions the abi tags from the return type need to be added | |
to the mangling of the function name, as long as they are not part of | |
the mangled function name otherwise (as tag on any involved namespace | |
or parameter type). Use nested "null" mangling of the signature to |
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 | |
syntax() { | |
echo "$0 [options] [--] cmd..." | |
echo "Options:" | |
echo " --stdout <logfile>: append stdout to logfile" | |
echo " --stderr <logfile>: append stderr to logfile" | |
echo "Returns exit code returned by captured command" | |
exit 1 | |
} |