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
| # A very basic mysql health check that can be used by e.g. | |
| # Consul's External Service Monitor | |
| # | |
| # Cobbled together by @jaygooby from a combination of: | |
| # Unai Rodriguez's and Alex Williams' | |
| # https://gist.github.com/aw/1071144 | |
| # and George Chilumbu's | |
| # https://georgechilumbu.wordpress.com/2017/07/27/setup-a-consul-client/ | |
| # | |
| # This script checks if a mysql server is healthy running on $MYSQL_HOST. |
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 | |
| # | |
| # Based on http://git.savannah.gnu.org/cgit/src-highlite.git/tree/src/src-hilite-lesspipe.sh.in | |
| # by Lorenzo Bettini | |
| # | |
| # Modified by Jay Caines-Gooby to support piped files | |
| # jay@gooby.org | |
| # @jaygooby | |
| # | |
| # Typically called by setting: |
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 | |
| # Gist: 11375877 | |
| # Url: https://gist.github.com/goodevilgenius/11375877 | |
| # | |
| # All memcache functions are supported. | |
| # | |
| # Can also be sourced from other scripts, e.g. | |
| # source membash.sh | |
| # MCSERVER="localhost" |
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 | |
| # | |
| # Generates an nginx compatible map that you can use to | |
| # put the relevant Google country code in your Content-Security-Policy | |
| # instead of having them all. | |
| # | |
| # Add these to your nginx config: | |
| # geoip2 /path/to/GeoLite2-Country.mmdb { | |
| # $geoip2_country_code default=US source=$remote_addr country iso_code; | |
| # $geoip2_country_name country names en; |
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
| # DOH. There's a command for this already: | |
| ssh-keygen -R <the host> |
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 | |
| # | |
| # MIT License | |
| # | |
| # Copyright (c) 2021 Jay Caines-Gooby, @jaygooby, jay@gooby.org | |
| # | |
| # The one-liner from https://jay.gooby.org/2021/11/30/find-interesting-referers-in-access-log | |
| # | |
| # Usage: interesting-referers /path/to/access.log | |
| # interesting-referers /path/to/access.log example.com |
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
| Now https://github.com/jaygooby/kaslurp |
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
| # log4j jndi exploit CVE-2021-44228 filter | |
| # Save this file as /etc/fail2ban/filter.d/log4j-jndi.conf | |
| # then copy and uncomment the [log4j-jndi] section | |
| # to /etc/fail2ban/jail.local | |
| # | |
| # jay@gooby.org | |
| # https://jay.gooby.org/2021/12/13/a-fail2ban-filter-for-the-log4j-cve-2021-44228 | |
| # https://gist.github.com/jaygooby/3502143639e09bb694e9c0f3c6203949 | |
| # Thanks to https://gist.github.com/kocour for a better regex | |
| # |
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
| Moved to https://github.com/jaygooby/what-user-agent |
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 | |
| # | |
| # | |
| # MIT License | |
| # | |
| # Copyright (c) 2022 Jay Caines-Gooby, @jaygooby, jay@gooby.org | |
| # | |
| # Permission is hereby granted, free of charge, to any person obtaining a copy | |
| # of this software and associated documentation files (the "Software"), to deal | |
| # in the Software without restriction, including without limitation the rights |