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 | |
# | |
# -------------------------------------------------------------------------------------------- | |
# Nginx IP Address Deny List download and format | |
# -------------------------------------------------------------------------------------------- | |
# This file pulls from http://www.stopforumspam.com/downloads/bannedips.zip to | |
# retrieve a list of IPs known to be associated with spam. The program | |
# downloads, unzips, and formats the IP addresses into an NGINX config using | |
# 'deny' | |
# |
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
global | |
log /dev/log local0 | |
log /dev/log local1 notice | |
chroot /var/lib/haproxy | |
stats socket /run/haproxy/admin.sock mode 660 level admin | |
stats timeout 30s | |
user haproxy | |
group haproxy | |
daemon | |
maxconn 2048 |
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 | |
# | |
# -------------------------------------------------------------------------------------------- | |
# MongoDB install architecture | |
# -------------------------------------------------------------------------------------------- | |
# Installs MongoDB in a Node JS environment with a REST API | |
# - MongoDB | |
# - NodeJS | |
# - Node_module mongodb | |
# - Node_module mongo-rest |
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 | |
# | |
# -------------------------------------------------------------------------------------------- | |
# Automatic Residency Wiki Web Server Status Checkup | |
# -------------------------------------------------------------------------------------------- | |
# This file checks the status of the residency wiki database at | |
# https://resdb.physicianscientists.org/Main_Page in order to determine if the server has gone | |
# down. Basic "curl" is performed looking for HTTP 200 status code. An email alert is sent | |
# to an administrator if a 200 status code is not received. | |
# |
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 | |
# | |
# -------------------------------------------------------------------------------------------- | |
# Machine Learning Project Directory and Environment Setup | |
# -------------------------------------------------------------------------------------------- | |
# Automatically generates a basic scaffold for machine learning projects. Sets up | |
# the directory structure along with both a nodejs and python environment as well. | |
# Environment can be modified as needed with additional packages installed for both | |
# python and nodejs as well as additional directories being created. | |
# |
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
CURRENT_NAME=$1 | |
NEW_NAME=$2 | |
if [[ -z "$CURRENT_NAME" ]] || [[ -z "$NEW_NAME" ]]; then | |
echo "Must provide current name and new name" | |
exit 1 | |
fi | |
# nginx files | |
mv /etc/nginx/sites-available/$CURRENT_NAME /etc/nginx/sites-available/$NEW_NAME |
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
# just insure that the haproxy cfg file has these settings | |
frontend https-cluster | |
bind *:80 | |
bind *:443 ssl crt /etc/ssl/private | |
acl letencrypt_challenge_request path_beg /.well-known/acme-challenge | |
use_backend letsencrypt_challenge_server if letsencrypt_challenge_request | |
backend letsencrypt_challenge_server | |
server letsencrypt 127.0.0.1:3313 # port is irrelevant as long as it doesn't match one of the bind ports above and is the same as in the --http-01-port= below |
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
############################## | |
# How to Setup New Server | |
############################## | |
# | |
# Create a directory in /srv/portal_knights_dedicated_server/XX where XX is a name like 'personal' | |
# Copy the E:\Steam\steamapps\common\Portal Knights\dedicated_server.zip to the new folder and extract | |
# | |
# Enable/Start systemd service | |
# systemctl enable portal-knights@personal | |
# systemctl start portal-knights@personal |