Skip to content

Instantly share code, notes, and snippets.

View LukeHandle's full-sized avatar

Luke Hanley LukeHandle

View GitHub Profile

Minotar.net Ideas

Caching

Is there another alternative to Redis that may offer supplier cache retrieval?

Where possible splitting off into different Redis instances also offers advantages. We can attempt to multi-thread the process.

Key System:

@LukeHandle
LukeHandle / excerpt.go
Created October 3, 2015 15:01
Inserting HTTP Header before handler
func startServer(listen string) {
r := Router{Mux: mux.NewRouter()}
r.Bind()
//http.Handle("/", r.Mux)
http.HandleFunc("/", func(w http.ResponseWriter, req *http.Request) {
w.Header().Set("Header", "Here")
r.Mux.ServeHTTP(w, req)
})
log.Printf("Starting on %s", listen)
err := http.ListenAndServe(listen, nil)
@LukeHandle
LukeHandle / xf_uuid_null.php
Last active August 29, 2015 14:16
Simple PHP script to add UUID to users in an XenForo database who have "NULL" UUIDs (for use with the Minecraft name changer plugin)
<?php
/*
* LukeHandle
* Generic disclaimer about no responsibility for this script
*
* Updated 9th March 2015
*/
$httpRequests = 0;
$records = 0;
@LukeHandle
LukeHandle / control_all.sh
Last active January 4, 2016 02:49
Example script for Spigot Forums on controlling multiple servers over SSH
#!/bin/bash
# Specify the servers here in an array
serverip[0]="10.10.10.2"
serverip[1]="10.10.10.3"
serverip[2]="10.10.10.4"
serverip[3]="10.10.10.5"
serverip[4]="10.10.10.6"
serverip[5]="10.10.10.7"
@LukeHandle
LukeHandle / gist:5308014
Created April 4, 2013 05:18
Instructions for Setting up Dynmap on nginx with CentOS

Setting up Dynamic Map with Nginx under CentOS 6.X

Introduction

One of the ideas behind using Nginx (or Apache for that matter) instead of the built in "Jetty Web Server" is that you can alleviate some of the strain to bukkit that may occur due to high traffic etc. to the map. If you host your own website (and therefore are already using port 80), it will also allow you to have the map sitting on a nice http://map.example.com/ as opposed to http://map.example.com:8123/ (setting up DNS records is past the scope of this document).

Note: This guide is made with the assumption that the web server is seperate to the Minecraft server. In this example I will use 192.168.1.2 for the Minecraft server and 192.168.1.3 as the Nginx server. If you choose to run them on the same server you could just change the 192.168.1.2 to 127.0.0.1 in the configurations - just be aware that this is likely not an optimal configuaration (questionable if proxying in the situation would help?).

CentOS