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 | |
# Paste at shell prompt (or download and execute) and get: | |
# | |
# sdc 9936 hours ( 1.13 years) 3.49TiB SAMSUNG MZ7KH3T8 | |
# nvme0n1 9936 hours ( 1.13 years) 3.49TiB SAMSUNG MZQLB3T8HALS-00007 | |
# sde 9932 hours ( 1.13 years) 4.55TiB ST5000LM000-2AN1 | |
# sdd 9931 hours ( 1.13 years) 4.55TiB ST5000LM000-2AN1 | |
# sdb 9617 hours ( 1.09 years) 0.01TiB SuperMicro SSD | |
# sda 9616 hours ( 1.09 years) 0.01TiB SuperMicro SSD |
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
RewriteEngine On | |
RewriteCond %{QUERY_STRING} ^resource=acct:andy@ [NC] | |
RewriteRule /.well-known/webfinger https://social.bitfolk.com/.well-known/webfinger?resource=acct:grifferz@social.bitfolk.com [NC,L,R=301] | |
RewriteCond %{QUERY_STRING} ^resource=acct:grifferz@ [NC] | |
RewriteRule /.well-known/webfinger https://social.bitfolk.com/.well-known/webfinger?resource=acct:grifferz@social.bitfolk.com [NC,L,R=301] |
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 | |
# Keep two different EFI System Partitions (ESP) in sync, because it's 2021 and | |
# EFI still doesn't support software RAID properly. The idea being to add boot | |
# entries for both: | |
# | |
# $esp1/grubx64.efi | |
# | |
# …and: | |
# |
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 | |
# Shows various percentiles for the age of your media attachments, i.e. the | |
# stuff under mastodon/web/system/cache/media_attachments/ | |
# Usage: | |
# - Have psql installed so you can connect to your database. | |
# - Make sure to set PGUSER, PGHOST and PGDATABASE environment variables. | |
# - Also set PGPASSWORD otherwise it will ask you. | |
# ./cache_age_percentiles.sh |
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 | |
# Probably needs GNU AWK. Come to think of it, some OSes | |
# won't have a `find` with -printf like GNU does. | |
# Usage: | |
# ./cache_by_ext_bytes.sh /path/to/mastodon/system/cache | |
cache_dir=${1-/opt/mastodon/web/system/cache} | |
# This will handle spaces in filenames, but not newlines in filenames… |
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 | |
# Probably needs GNU AWK. Come to think of it, some OSes | |
# won't have a `find` with -printf like GNU does. | |
# Usage: | |
# ./cache_by_ext.sh /path/to/mastodon/system/cache | |
cache_dir=${1-/opt/mastodon/web/system/cache} | |
find "$cache_dir" -type f -printf "%p\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
MIME-Version: 1.0 | |
From: BitFolk test Email <andy-test@bitfolk.com> | |
To: andy@strugglers.net | |
Subject: BitFolk test email (Without multipart/mixed container) | |
X-Mailer: BitFolk Test Script | |
Organization: BITFOLK LIMITED, Registered in England (No. 6032951, VAT no. | |
990 4159 02); 21 Trevithick Close, Feltham, Greater London, TW14 9XJ, | |
United Kingdom; https://bitfolk.com/contact.html | |
Content-Type: multipart/mixed; boundary="----------=_1665404967-3424-0" |
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
# /etc/exim4/conf.d/router/050_traffic_tap | |
# This should be the first defined router. | |
traffic_tap: | |
unseen | |
no_expn | |
no_verify | |
transport = local_copy_outgoing | |
driver = accept | |
# "mm_domains" is a list of domain names for mailman, e.g. | |
# "lists.example.com"; it's set as part of the usual Mailman install on |
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 | |
# Needs bash because uses bash arrays. | |
# Use mysqldump to dump out the mailman3 and mailman3web databases | |
# through a pipe to gzip, then move it on top of the last backup. It | |
# is assumed your general backup system takes care of backing up those | |
# files elsewhere, keeping historical copies. | |
# | |
# All tables from the mailman3 database are dumped out, but only the |
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
diff -Naur a/usr/lib/live/boot/9990-networking.sh b/usr/lib/live/boot/9990-networking.sh | |
--- a/usr/lib/live/boot/9990-networking.sh 2022-01-28 21:16:07.880622551 +0000 | |
+++ b/usr/lib/live/boot/9990-networking.sh 2022-01-28 21:15:40.504719118 +0000 | |
@@ -104,16 +104,25 @@ | |
fi | |
done | |
else | |
- for interface in ${DEVICE}; do | |
- ipconfig -t "$ETHDEV_TIMEOUT" "${interface}" | tee "/netboot-${interface}.config" | |
- |
NewerOlder