Skip to content

Instantly share code, notes, and snippets.

Avatar

Sam Dennon SamEureka

View GitHub Profile
@SamEureka
SamEureka / gist:cc1b596c92c03df58b06f0d1ce2a0a3c
Created Sep 28, 2020 — forked from dsci/gist:1347672
Delete commits from repository.
View gist:cc1b596c92c03df58b06f0d1ce2a0a3c
# First, check out the commit you wish to go back to (get sha-1 from git log)
git reset --hard 9d3c3a0caa7f7b35ef15adb96fc80fcbb59ac72a
# Then do a forced update.
git push origin +9d3c3a0caa7f7b35ef15adb96fc80fcbb59ac72a^:develop
# Push specific commit
git push origin 9d3c3a0caa7f7b35ef15adb96fc80fcbb59ac72a:develop -f
@SamEureka
SamEureka / docker-compose.yml
Last active Jul 8, 2020
Docker Compose file for Jira/Confluence/Postgres setup
View docker-compose.yml
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 Oct 24, 2017
Crafty Server landing page
View index.html
<!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 Oct 24, 2017
stop script for multiple MC servers // not DRY yet
View stop.sh
#!/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 Oct 24, 2017
start script for multiple MC servers // needs ServerStart.sh
View start.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 &
View check.sh
#!/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 Oct 24, 2017
work in progress start script
View test.sh
#!/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
View iterate.sh
#!/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 Jun 1, 2017
Stop some servers running in "Screen"
View stop.sh
#!/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 Oct 30, 2019
Splunk w/ NGINX SSL Reverse Proxy
View splunk-nginx.md

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

You can’t perform that action at this time.