Skip to content

Instantly share code, notes, and snippets.

@davidfowl
davidfowl / dotnetlayout.md
Last active November 13, 2024 13:19
.NET project structure
$/
  artifacts/
  build/
  docs/
  lib/
  packages/
  samples/
  src/
 tests/
@agarzon
agarzon / queueCounter.sh
Last active March 28, 2023 01:15
alert based in mail queue size for postfix and plesk
#!/bin/sh
MAIL_BIN=`command -v mail`
QUEUE_SIZE=`/usr/sbin/postqueue -p | tail -n1 | awk '{print $5}'`
QUEUE_SUMMARY=`/usr/sbin/qshape -s deferred | head`
MAILTO="[email protected]"
LIMIT=100
function send_notification_mail() {
echo $QUEUE_SUMMARY | $MAIL_BIN -s "WARNING: mail queue critical on $HOSTNAME" $MAILTO