Language | ISO-639-1 Code |
---|---|
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 | |
###config### | |
dir="~"; | |
############ | |
#variables | |
url=$1; | |
title=$2; | |
filename=archive-$(date +"%Y-%m-%d_%H-%M_%S").log; |
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 | |
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 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 <andi@splitbrain.org> | |
* @see \dokuwiki\Utf8\Clean::deaccent() | |
*/ |
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 | |
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 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
grep -o "[0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+" auth.log | sort | uniq -c | sort -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
rsync -av -f"+ */" -f"- *" "$source" "$target" |
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
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; |
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 | |
if [ "$#" -lt 4 ]; then | |
echo "`basename $0` <mysql-root-passwd> <db user> <ip> <db password>"; | |
exit 1; | |
fi | |
mysql --user=root --password=$1 <<EOF | |
CREATE DATABASE wordpress; | |
CREATE USER '$2'@'$3' IDENTIFIED BY '$4'; |
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 -e | |
tty=$(/bin/tty) | |
ttyRemote="$1" | |
ptsprogram="/root/bin/ptsSSH" | |
while : | |
do | |
read -p "$ttyRemote> " input | |
$ptsprogram -n $ttyRemote "$input > $tty"; | |
done |