Skip to content

Instantly share code, notes, and snippets.

View SamEureka's full-sized avatar
🏚️
Working from home - CA

Sam Dennon SamEureka

🏚️
Working from home - CA
View GitHub Profile
@SamEureka
SamEureka / docker-compose.yml
Last active August 10, 2023 19:53
Docker Compose file for Jira/Confluence/Postgres setup
version: '3.3'
services:
confluence-server:
depends_on:
- postgres-server
environment:
- JVM_MINIMUM_MEMORY=$JVM_MIN
- JVM_MAXIMUM_MEMORY=$JVM_MAX
- JVM_RESERVED_CODE_CACHE_SIZE=$JVM_HEAP
- ATL_PROXY_NAME=site.url
@SamEureka
SamEureka / index.html
Created October 24, 2017 17:38
Crafty Server landing page
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>SamEureka's 'Crafty' - A Modded Minecraft Server!</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://use.typekit.net/mcq1pvw.js"></script>
<script>try{Typekit.load({ async: true });}catch(e){}</script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" rel='stylesheet' type='text/css'>
<link href='https://cdnjs.cloudflare.com/ajax/libs/skeleton/2.0.4/skeleton.min.css' rel='stylesheet' type='text/css'>
@SamEureka
SamEureka / stop.sh
Created October 24, 2017 15:50
stop script for multiple MC servers // not DRY yet
#!/bin/bash
# Check to see if direwolf is runing
dire=`screen -list | grep direwolf`
# TODO put this in a while loop to make it better
# (it's good enough for now)
# TODO make it all DRY
@SamEureka
SamEureka / start.sh
Created October 24, 2017 15:49
start script for multiple MC servers // needs ServerStart.sh
#!/bin/bash
# echo "Starting Direwolf on port: 25566"
# cd /home/sam/servers/direwolf && screen -dmS direwolf ./ServerStart.sh &
# echo "Starting Infinity on port: 25567"
# cd /home/sam/servers/infinity && screen -dmS infinity ./ServerStart.sh &
echo "Starting SkyFactory on port: 25565"
cd /home/sam/servers/skyfactory && screen -dmS skyfactory ./ServerStart.sh &
@SamEureka
SamEureka / check.sh
Created October 24, 2017 15:47
check script
#!/bin/bash
# Create an array with the screen instance names. (The screen names are 10 characters because I suck at REGEX)
LIST=(`screen -list |grep -o '[a-z]\{10\}'`)
# Iterate over the array to do the work.
for i in "${LIST[@]}"; do
# Create a working string variable with the name
work="$i"
check=`screen -list |grep $work`
@SamEureka
SamEureka / test.sh
Created October 24, 2017 15:45
work in progress start script
#!/bin/bash
# SAMPLE1='1-first.with.custom.name'
# SAMPLE2='2-second.with.custom.name'
# for (( i = 1; i <= 2; i++ ))
# do
# var="SAMPLE$i"
# echo ${!var}
# done
@SamEureka
SamEureka / iterate.sh
Created October 24, 2017 15:44
shell iterate
#!/bin/bash
LIST=(`screen -list |grep -o '[a-z]\{10\}'`)
for i in "${LIST[@]}"; do
work="$i"
echo ${work}
done
@SamEureka
SamEureka / stop.sh
Last active June 1, 2017 12:01
Stop some servers running in "Screen"
#!/bin/bash
# Create an array with the screen instance names. (The screen names are 10 characters because I suck at REGEX)
LIST=(`screen -list |grep -o '[a-z]\{10\}'`)
# Iterate over the array to do the work.
for i in "${LIST[@]}"; do
# Create a working string variable with the name
work="$i"
check=`screen -list |grep $work`
@SamEureka
SamEureka / splunk-nginx.md
Last active October 30, 2019 17:26
Splunk w/ NGINX SSL Reverse Proxy

Installing Splunk w/NGINX SSL Reverse Proxy

The steps outlined here make many assumptions about both your operating environment and your understanding of the Linux OS and services running on Linux. I am using the current LTS Ubuntu distribution 16.04 running in the cloud on a DigitalOcean Droplet. These steps should work just fine if followed closely and in order... but you know sh!& never works out the way you plan in Linux. I offer some troubleshooting advice, Google and Stack are your friends ask them for help.
  1. SSH into your pre-configured server running NGINX SSL Reverse Proxy ssh <username>@<server-url-or-IP> **See guide here

  2. Download Splunk Enterprise using WGET `wget -O splunk-6.5.1-f74036626f0c-linux-2.6-amd64.deb 'https://www.splunk.com/bin/splunk/DownloadActivityServlet?architecture=x86_64&platform=linux&version=6.5.1&product=splunk&filename=splunk-6.5.1-f7

@SamEureka
SamEureka / nginx-ssl-proxy.md
Last active August 12, 2021 22:43
NGINX SSL Reverse Proxy, w/ fail2ban, letsencrypt, and iptables-persistent

Installing NGINX SSL Reverse Proxy, w/ fail2ban, letsencrypt, and iptables-persistent.

The steps outlined here make many assumptions about both your operating environment and your understanding of the Linux OS and services running on Linux. I am using the current LTS Ubuntu distribution 16.04 running in the cloud on a DigitalOcean Droplet. These steps should work just fine if followed closely and in order... but you know sh!& never works out the way you plan in Linux. I offer some troubleshooting advice, Google and Stack are your friends ask them for help.
(Entered on your local workstation)
  1. ssh-add <path-to-ssh-key> and enter key passphrase when prompted. // ex path... /users/you/.ssh/id_rsa_digital-ocean
  2. ssh root@<server-url-or-IP> // should login without prompting for passphrase
(Entered on your remote server)
  1. adduser and follow prompts