mkct() {
mkc $(mktemp -d)
}
+# mkdir the last arg, cp the rest into it
+mkcp() {
+ mkdir -p "${@: -1}"
+ cp "${@:1:$#-1}" "${@: -1}"
+}
+mkmv() {
+ mkdir -p "${@: -1}"
+ mv "${@:1:$#-1}" "${@: -1}"
+}
mkt() { # mkdir and touch file
local path="$1"
fi
}
+# prometheus node curl
+pnodecurl() {
+ local host
+ host=${1:-127.0.0.1}
+ s curl --cert-type PEM --cert /etc/prometheus/ssl/prometheus_cert.pem --key /etc/prometheus/ssl/prometheus_key.pem --cacert /etc/prometheus/ssl/prom_node_cert.pem --resolve prom_node:9100:$host -v https://prom_node:9100/metrics
+}
+
tx() { # toggle set -x, and the prompt so it doesnt spam
if [[ $- == *x* ]]; then
set +x
_spark_echo
}
+pdfwc() { local f; for f; do echo "$f" $(pdfinfo "$f" | awk '/^Pages:/ {print $2}'); done }
# * misc stuff