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
| #!/usr/bin/expect -f | |
| # interface-restart.exp | |
| # Expect script for restarting interface connection on Keenetic Start router. | |
| set host $env(KEENETIC_HOST) | |
| set port $env(KEENETIC_PORT) | |
| set login $env(KEENETIC_LOGIN) | |
| set password $env(KEENETIC_PASSWORD) | |
| set interface $env(KEENETIC_INTERFACE) | |
| set connection $env(KEENETIC_CONNECTION) |
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
| #!/usr/bin/sh | |
| curl -s https://mcutils.com/api/server-jars/vanilla | jq -r '.[0].version' |
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
| #!/usr/bin/sh | |
| unzip -p server.jar version.json | jq -r ".name" |
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
| #!/usr/bin/sh | |
| # minecraft_server_backup.sh | |
| # Minecraft server backup script. | |
| # Before using this script, make sure that you install | |
| # Minecraft server according to this guide: | |
| # https://www.lessavin.ru/blog/minecraft-server.html | |
| # Configuration. | |
| # Minecraft server directory. |
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/sh | |
| # pass2tsv.sh | |
| # ZX2C4's password manager TSV exporter. | |
| pass grep --color=none . | sed -z -e 's/\x1b\[[0-9;]*m//g' -e 's/:\n/\t/g' | sort |
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
| #!/usr/bin/sh | |
| # natcheck.sh | |
| # Returns 1 if ISP put you under NAT. | |
| # Source: https://superuser.com/questions/1630106/how-do-i-find-out-if-my-isp-has-put-me-behind-a-nat-will-dynamic-dns-work-with | |
| NATCHECK_HOPS=2 # Change this value to <rounter_number>+1. | |
| if [ $NATCHECK_HOPS -lt $(traceroute $(curl -s ifconfig.me) | grep ms | wc -l) ] | |
| 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
| [Unit] | |
| Description=Minecraft Server | |
| [Service] | |
| WorkingDirectory=/srv/minecraft-server | |
| User=minecraft-server | |
| Group=minecraft-server | |
| UMask=007 | |
| Restart=on-failure | |
| RestartSec=60 |
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
| # RCON is BAD, don't open this port! There no security for your server! | |
| # Instead of this, use SSH: | |
| # 1. Install on the server mcrcon by Tiiffi (https://github.com/Tiiffi/mcrcon). | |
| # 2. Set environment variables as $MCRCON_HOST, $MCRCON_PORT and $MCRCON_PASS. | |
| # 3. Use next script... | |
| ssh $MCRCON_HOST mcrcon -H localhost -P $MCRCON_PORT -p $MCRCON_PASS $@ | |
| # You also can create command alias in .bashrc: | |
| alias ssh2rcon='ssh $MCRCON_HOST mcrcon -H localhost -P $MCRCON_PORT -p $MCRCON_PASS' |
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 | |
| # pyzamrename.sh | |
| # Renames files according pyzam result | |
| set -e | |
| input=$(pyzam --input "$@") | |
| artist=$(echo "$input" | grep 'Artist:' | cut -d ':' -f 2 | cut -c 2-) | |
| if [ -z "$artist" ]; 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
| # /home/steam/.config/systemd/user/Terraria.service | |
| [Unit] | |
| Description=Server daemon for Terraria | |
| After=network.target | |
| [Service] | |
| WorkingDirectory=/home/steam/Steam/steamapps/common/Terraria | |
| Restart=always |
NewerOlder