Skip to content

Instantly share code, notes, and snippets.

View prehnRA's full-sized avatar

Robert Prehn prehnRA

View GitHub Profile

Keybase proof

I hereby claim:

  • I am prehnRA on github.
  • I am prehnra (https://keybase.io/prehnra) on keybase.
  • I have a public key whose fingerprint is 4B4A 35DE 8725 41D8 AF4D 8038 3414 05EA 5632 47D1

To claim this, I am signing this object:

@prehnRA
prehnRA / learning-kubernetes.md
Created June 17, 2018 14:54
My learning kubernetes journal

Learning Kubernetes

Questions / Resource Search

  • What are the good books?
  • Are there good online courses?
  • What about figuring out how things go wrong and fix them?
  • Anything for AppEng people?

Learn Docker

@prehnRA
prehnRA / spiral
Last active October 17, 2017 01:42
[16][15][14][13][12]
[17][ 4][ 3][ 2][11]
[18][ 5][ 0][ 1][10]
[19][ 6][ 7][ 8][ 9]
[20][21][22][23][24]
@prehnRA
prehnRA / SkyboxCamera.cs
Created October 19, 2016 23:23
A script to capture a scene to a cubemap asset for use as a sky box
using UnityEngine;
using UnityEditor;
public class SkyboxCamera : MonoBehaviour {
const int TEXTURE_SIZE = 1024;
void Update() {
if(Input.anyKey) {
Capture();
}
@prehnRA
prehnRA / StatsTest.cs
Created September 28, 2016 13:34
Unity editor script for running test every time code changes
using UnityEngine;
using System.Collections;
[ExecuteInEditMode]
public class StatsTest : MonoBehaviour {
[UnityEditor.Callbacks.DidReloadScripts]
private static void OnScriptsReloaded() {
Statistics stats = new Statistics();
stats.Run();
stats.Log();
@prehnRA
prehnRA / StripeShader.shader
Last active May 6, 2016 03:19
A basic shader for making grids on an object
Shader "Unlit/StripeShader"
{
Properties
{
// Color property for material inspector, default to white
// _Color is the color of the grid lines, actually (need to flip these
// at some point)
_Color ("Main Color", Color) = (1,1,1,0.5)
// _Color2 is actually the main body color
_Color2 ("Other Color", Color) = (1,1,1,0.5)
class Node
attr_accessor :next
def initialize(nxt)
@next = nxt
end
def self.linked_list_with_cycle
node = linked_list_without_cycle
node.next.next.next = node
# Write a method called `word_wrap` that takes 1 to 2 arguments.
# The first argument is a string.
# The second argument is optional, and represents a maximum line length. The
# default value should be 80.
# `word_wrap` should a string formatted such that no line is longer than the
# line length specified by the second argument (i.e. no more than N characters
# between newlines).
# You should not break words apart, however, you can assume that the line width
# will never be shorter than the longest word.
@prehnRA
prehnRA / word_wrap.rb
Created October 30, 2015 16:41
Coding Challenge: Word Wrap
# Write a method called `word_wrap` that takes 1 to 2 arguments.
# The first argument is a string.
# The second argument is optional, and represents a maximum line length. The
# default value should be 80.
# `word_wrap` should a string formatted such that no line is longer than the
# line length specified by the second argument (i.e. no more than N characters
# between newlines).
# You should not break words apart, however, you can assume that the line width
# will never be shorter than the longest word.
class LRS
SIZE = 10
attr_accessor :key_history, :inner
def initialize()
self.key_history = []
self.inner = {}
end
def get(key)