Skip to content

Instantly share code, notes, and snippets.

View brandonlamb's full-sized avatar

Brandon Lamb brandonlamb

View GitHub Profile
@brandonlamb
brandonlamb / MiscreatedCVARHelp.md
Created November 14, 2020 19:13 — forked from csprance/MiscreatedCVARHelp.md
Miscreated Servers RCON commands and server configuration help

Miscreated Servers

RCON commands and server configuration help

Available Commands:

  • sv_servername "Name of server in quotes"
  • wm_timeScale 3 How Fast time moves
  • wm_forceTime -1 Force a current time
  • g_pinglimit 0 Ping required to join
@brandonlamb
brandonlamb / quadtree.java
Created January 31, 2020 23:14 — forked from AbhijeetMajumdar/quadtree.java
Quadtree Java implementation
A quadtree is a tree data structure in which each internal node has exactly four children. Quadtrees are most often used to
partition a two-dimensional space by recursively subdividing it into four quadrants or regions. The regions may be square or
rectangular, or may have arbitrary shapes.
More on
https://en.wikipedia.org/wiki/Quadtree
Thanks to Jim for such an excellent visual representation on http://jimkang.com/quadtreevis/
@brandonlamb
brandonlamb / httpsig-in-postman-pre-request-script.js
Created May 30, 2019 18:11 — forked from DinoChiesa/httpsig-in-postman-pre-request-script.js
pre-request script for Postman, to perform HttpSignature calculation. Also SHA-256 message digest.
function computeHttpSignature(config, headerHash) {
var template = 'keyId="${keyId}",algorithm="${algorithm}",headers="${headers}",signature="${signature}"',
sig = template;
// compute sig here
var signingBase = '';
config.headers.forEach(function(h){
if (signingBase !== '') { signingBase += '\n'; }
signingBase += h.toLowerCase() + ": " + headerHash[h];
});
@brandonlamb
brandonlamb / Dockerfile
Last active November 22, 2018 06:37
micronaut-ResourceLeakDetector
FROM adoptopenjdk/openjdk8-openj9:x86_64-alpine-jdk8u192-b12_openj9-0.11.0r0-slim
RUN apk update && apk upgrade && mkdir -p /opt/shareclasses /opt/app
COPY run.sh /opt/app
EXPOSE 8080
ENTRYPOINT ["/opt/app/run.sh"]
@brandonlamb
brandonlamb / README.md
Created November 12, 2018 06:31 — forked from adambom/README.md
Backup Kubernetes Cluster State

Run this in order to backup all you k8s cluster data. It will be saved in a folder bkp. To restore the cluster, you can run kubectl apply -f bkp.

Please note: this recovers all resources correctly, including dynamically generated PV's. However, it will not recover ELB endpoints. You will need to update any DNS entries manually, and manually remove the old ELB's.

Please note: This has not been tested with all resource types. Supported resource types include:

  • services
  • replicationcontrollers
  • secrets
  • deployments
  • horizontal pod autoscalers
@brandonlamb
brandonlamb / rpc.gd
Created December 26, 2017 04:25 — forked from bibby/rpc.gd
Godot HTTPClient usage
## rpc.gd
# An experiment in using HTTPClient
# for blocking RPCs
# @author bibby<bibby@bbby.org>
#
# get( url )
# post( url, body )
# put( url, body )
# delete( url )
void InitializeStars() {
for(int i = 0; i < LengthOf(starPositions); i++) {
// Choose a distance from the center of the galaxy.
float distance = RandFloat();
// Choose an angle between 0 and 2 * PI.
float angle = RandFloat() * 2 * PI;
// Translate from polar to cartesian coords.
starPositions[i].x = cos(angle) * distance;
@brandonlamb
brandonlamb / http_request.gd
Created December 12, 2017 07:12 — forked from arthurtemple/http_request.gd
A HTTP Request class with Async using Thread suitable for REST API implementation
# Modified from http://codetuto.com/2015/05/using-httpclient-in-godot/
# Added POST and Optional Header Perimeter
extends Node
var reqlist = []
class request:
var t
var params
var finished = false
@brandonlamb
brandonlamb / zk-inst.sh
Created October 15, 2017 03:48
install zookeeper on Ubuntu (16.04)
sudo apt-get update -y
sudo apt-get upgrade -y
sudo add-apt-repository -y ppa:webupd8team/java
sudo apt-get update -y
sudo apt-get install oracle-java8-installer -y
sudo java -version
sudo apt-get install zookeeperd -y
netstat -ant | grep :2181
@brandonlamb
brandonlamb / Objective.cs
Created August 13, 2017 15:22 — forked from grofit/Objective.cs
Quick RPG Quest System Example
public class Objective
{
public ObjectiveType Type {get;set;}
public int ObjectiveInt {get;set;}
public float ObjectiveFloat {get;set;}
public Vector3 ObjectiveVector {get;set;}
// could possibly use Dictionary instead
}