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 | |
# Script to rotate your aws keys, and update them in ~/.aws/credentials | |
# Requirements: awscli, jq | |
# Will attempt all profiles by default | |
# You can specify a profile with the -p flag. | |
# Profiles and their access key/secret can be commented out with # and the script will skip them | |
AWS_PROFILES=() |
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
# /etc/nginx/sites-enabled/ssl.conf or default.conf. Change and add your configuration accordingly | |
# | |
# With this nginx configuration, we can default to showing an error page if the proxy fails. Our setup is | |
# a little unique, in that our domain name (mc.ourdomain.com) forwards anything 404 related to a our main | |
# site for server information (www.ourdomain.com/servers/minecraft) the only reason to use the mc subdoamin | |
# is to join the server, and view the map (mc.ourdomain.com/map). This config might be simplified if we | |
# were redirecting all other traffic (ie, the location = for specific image files may not be needed) | |
# | |
server { |
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 | |
/* | |
When you add an ssh key to a mikrotik user, ssh still gives a password prompt. | |
A valid key will make password login fail on ssh, but hackers don't know that. | |
They'll keep trying to pry in, forever fruitless. This is really just annoying | |
on the logs. So I created a firewall rule to drop traffic on port 22 unless the | |
source ip exists inside of a defined "ssh_whitelist". To add myself to this list, | |
I have a webserver on the network I can get to through https login, and simply | |
add my IP with this script. I have custom formatting on my own page, of course. | |
I've left formatting to the minimum here. You have the power to make it as pretty |
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 | |
host="127.0.0.1" | |
db="dynmap" | |
user="db_user_name" | |
pass="db_user_pass" | |
## an alternative to putting the password into the script ( "less secure" ) is to read the user input into the variable ( "more secure" ). | |
#echo "Enter password for $user: " | |
#read -s pass | |
#database sizes |
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 | |
# you'll want to run this script in a folder by itself. The folder will be populared with all the stuff required to build the jar | |
# REQUIREMENTS | |
# curl | |
# java | |
version=$1; | |
curl "https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar" -o BuildTools.jar |
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 | |
# I used this to easily export the json to a file for more processing | |
## bash minecraft_plugin_versions.sh > /var/www/html/info/version.json | |
## chown www-data:www-data /var/www/html/info/version.json | |
# this would save the file to my webserver directory, and ensure it had the right permissions to be processed by the server | |
# I then had a php script that would compare the list in a crude way against the developer sites for my plugins, and display them in a nice format | |
# that script I likely will not post as it's super dirty... Maybe if I find a better method of doing it. | |
# REQUIREMENTS | |
# zip |
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 | |
# I had this on an ubuntu box which had a USB hard drive for some basic server backups. | |
# this could be easily modified for other mounting types. | |
# REQUIREMENTS: | |
# install exfat compatability | |
# find the uuid of your drive (I used "ls -l /dev/disk/by-uuid" then "smartctl -i /dev/PATH_HERE" to determine which drive I was wanting | |
uuid="5566-77FF"; # the uuid can sometimes be longer. | |
mnt_path="/mount/exfat"; # mnt_path can be just about any empty folder you'd like. And it must be empty to work. |
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 | |
//If output buffer flushing does not work, web-search for reasons your php/webserver setup may need to be adjusted | |
header('X-Accel-Buffering: no'); | |
if (ob_get_level() == 0) ob_start(); | |
//create javascript progress bar | |
echo "<html> | |
<head> | |
<script type='text/javascript'> | |
function updateProgress(perc) { |