This file contains hidden or 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
| <?php | |
| /** | |
| * If you're using the WordPress function sanitize_file_name() and want | |
| * to use it with filenames like my-custom.min.css, you'll quickly find | |
| * out that .min.css isn't accepted as a valid extension. | |
| * | |
| * Here's a quick fix, using WordPress' filtering mechanisms. | |
| * | |
| * Joaquim Homrighausen <[email protected]> | |
| * Nov 13, 2025 |
This file contains hidden or 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 | |
| # | |
| # | |
| # Check expiration date of SSL certificate using cURL | |
| # | |
| # I'm sure there are a million ways to do this better, so feel free to. | |
| # The script is not extremely fault tolerant, but "it works for me" :) | |
| # You may need to --- modify --- this script to suit your environment. | |
| # |
This file contains hidden or 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 | |
| # Must be run by root | |
| if [ "$EUID" -ne 0 ]; then | |
| echo "This script must be run as root" | |
| exit 1 | |
| fi | |
| # Show script usage | |
| usage() { |
This file contains hidden or 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
| <?php | |
| /* | |
| * Simple password construct validator for PHP | |
| * This code uses mb_ereg_match() | |
| * Joaquim Homrighausen <[email protected]> | |
| * Mar 19, 2024 | |
| * | |
| * Do whatever you want with this snippet :) | |
| * | |
| * This may not necessarily agree with the section "Strength of Memorized |
This file contains hidden or 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 | |
| # | |
| # Simple (bash) script to check the number of iptables rules for Linux | |
| # | |
| # You could run this at system start (possibly after a few second delay) or | |
| # as a cron job every minute or so. On any given system, it's probably not | |
| # a normal situation that there exist no (zero) iptables rules. | |
| # |
This file contains hidden or 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 | |
| # | |
| # Check LSI RAID storage status | |
| # | |
| # This will trigger on the output NOT being "Optl" (Optimal). This works for me, | |
| # your mileage may vary. One problem in using more "verbose output" from the | |
| # storcli64 binary is that it always (?) outputs some sort of legend with all | |
| # the various status types explained, so it always contains the text "Degraded" | |
| # for example. This minor script will simply search for what we want, which is | |
| # a RAID in optimal state, and if NOT found, perform a full status scan and send |
This file contains hidden or 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
| === | |
| Lightbox (or "image preview") functionality for Bootstrap 4 without additional | |
| libraries (apart from jQuery). | |
| Written by Joaquim Homrighausen <[email protected]>, 30-May-2019 | |
| TEAMYUJO | |
| Do as you wish with this :) |
This file contains hidden or 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
| <?php | |
| /* | |
| * Simple password construct validator for PHP | |
| * Joaquim Homrighausen <[email protected]> | |
| * May 30, 2019 | |
| * TEAMYUJO | |
| * | |
| * Do whatever you want with this snippet :) | |
| * | |
| * This may not necessarily agree with the section |