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
""" | |
This script will search 4chan (need to specify a board unfortunately) and then | |
search all comments on Reddit for specific keywords. If found, it will then send | |
an email with the links to any matching posts. | |
Because 4chan posts are archived after ~48 hours I would recommend setting this up | |
to run on that cadence as well. | |
Sender email will need "Allow less secure apps" to ON or similar setting. | |
I followed these instructions for setting that up: |
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 | |
cp /home/westbam/cardano/itn_rewards_v1-config.yaml /home/westbam/cardano/itn_rewards_v1-config.yaml.new | |
# find all addresses that are not commented out | |
sed -e '/ address/!d' -e '/^[[:space:]]*#/d' -e '/Brainy/d' -e 's@^.*/ip./\([^/]*\)/tcp/\([0-9]*\).*@\1 \2@' /home/westbam/cardano/itn_rewards_v1-config.yaml | \ | |
while read addr port | |
do | |
echo "Checking $addr:$port" | |
RESULT=$(tcpping -x 1 $addr $port) |
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 | |
# | |
# Author: Michael Fazio (sandstone.io) | |
# | |
# This script monitors a Jormungandr node for "liveness" and executes a shutdown if the node is determined | |
# to be "stuck". A node is "stuck" if the time elapsed since last block exceeds the sync tolerance | |
# threshold. The script does NOT perform a restart on the Jormungandr node. Instead we rely on process | |
# managers such as systemd to perform restarts. | |
POLLING_INTERVAL_SECONDS=30 |