| Language | ISO-639-1 Code |
|---|---|
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 | |
| function increment_error_code { | |
| error_code=$((error_code + 1)) | |
| } | |
| function echo_error { | |
| (>&2 echo -e "${RED}${1}${NC}") | |
| } |
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 | |
| ###config### | |
| dir="~"; | |
| ############ | |
| #variables | |
| url=$1; | |
| title=$2; | |
| filename=archive-$(date +"%Y-%m-%d_%H-%M_%S").log; |
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 | |
| if [ "$#" -lt 2 ]; then | |
| echo "./`basename $0` <write url here> <write your site directory here> [second] [\"title\"] [\"html code or txt\"]"; | |
| exit 1; | |
| fi | |
| url=$1 | |
| directory=$2 | |
| if [ "$#" -gt 1 ]; then |
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 | |
| echo "ONLY FOR PODMAN" | |
| conf_file=$(find ~/.local/share/containers/storage -name dokuwiki-htaccess.conf 2>/dev/null) | |
| podman exec dokuwiki cat /opt/bitnami/dokuwiki/.htaccess.dist > /tmp/.htaccess | |
| cat >> /tmp/.htaccess << EOF |
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 | |
| /** | |
| * UTF-8 lookup table for lower case accented letters | |
| * | |
| * This lookuptable defines replacements for accented characters from the ASCII-7 | |
| * range. This are lower case letters only. | |
| * | |
| * @author Andreas Gohr <[email protected]> | |
| * @see \dokuwiki\Utf8\Clean::deaccent() | |
| */ |
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 | |
| curl -s ifconfig.co/json | jq -r "[.ip,.country,.city,.time_zone,.region_name,.asn,.asn_org,.hostname] | @tsv" > .tmp | |
| while IFS=" " read -r ip country city time_zone region_name asn asn_org hostname; do | |
| cat <<EOF | |
| IP : $ip | |
| Country : $country | |
| City : $city | |
| Time Zone : $time_zone |
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 | |
| script_dir=$(dirname $(readlink -f $0)) # script dir | |
| function guide() { | |
| echo "usage: ./`basename $0` [-u] [-s <app_name>]" | |
| echo "-u update log" | |
| echo "-s specific app log" | |
| echo "-l list packages" | |
| } |
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 | |
| curl https://www.cloudflare.com/ips-v4 > .ips-v4 | |
| curl https://www.cloudflare.com/ips-v6 > .ips-v6 | |
| firewall-cmd --new-zone=cloudflare --permanent | |
| firewall-cmd --reload | |
| for i in `<.ips-v4`; do firewall-cmd --zone=cloudflare --add-source=$i; done | |
| for i in `<.ips-v6`; do firewall-cmd --zone=cloudflare --add-source=$i; done |
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
| location = /404.html { | |
| root /usr/share/nginx/error; | |
| } | |
| error_page 404 /404.html; | |
| location = /50x.html { | |
| root /usr/share/nginx/error; | |
| } | |
| error_page 500 502 503 504 /50x.html; |