Skip to content

Instantly share code, notes, and snippets.

View timsegraves's full-sized avatar

Tim Segraves timsegraves

View GitHub Profile
@timsegraves
timsegraves / nginx_deployment.yaml
Created June 4, 2023 22:40 — forked from petitviolet/nginx_deployment.yaml
sample Nginx configuration on Kubernetes using ConfigMap to configure nginx.
apiVersion: v1
kind: ConfigMap
metadata:
name: nginx-conf
data:
nginx.conf: |
user nginx;
worker_processes 3;
error_log /var/log/nginx/error.log;
events {
Interviewsy::Application.configure do
# Expands the lines which load the assets
config.assets.debug = false
end
class Player
@stairs = false
@wall = false
def play_turn(warrior)
if damaged_from_behind(warrior)
warrior.shoot!(:backward)
else
if first_non_empty(warrior.look) == "enemy"
warrior.shoot!
/*Programmer: Austin Applegate
Date modified: 1/28/13 Description: read a file and take the contents of it and clean it up and fix the error's and then write it to a new file.
Lab Number: 1
Date Due: 2/6/13
*/
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#### Setup SSH, Users and Firewall
Follow steps from slicehost article:
http://articles.slicehost.com/2008/11/28/ubuntu-intrepid-setup-page-1

Running redis using upstart on Ubuntu

I've been trying to understand how to setup systems from the ground up on Ubuntu. I just installed redis onto the box and here's how I did it and some things to look out for.

To install:

@timsegraves
timsegraves / setup-statsd.sh
Created December 5, 2012 06:32 — forked from KyleAMathews/setup-statsd.sh
Turn an Ubuntu 12.04 Amazon EC2 Micro instance into a StatsD/Bucky/Graphite server
# Notes:
# Make sure and install ubuntu 12.04 instance instead of default amazon one.
# Root not enabled by default for ubuntu instance.
# Run sudo -i when you log in for persistent root.
# Update
sudo apt-get update
# install git
sudo apt-get install g++ curl libssl-dev apache2-utils make
@timsegraves
timsegraves / gist:3856525
Created October 9, 2012 04:03
Cube for Austin
str = "JAYHAWK"
i = 0
j = 0
builder = ""
# Each item in this loop will be a new line in your cube
while i < str.length do
# Reset the variables (won't need to do this in java for loops)
builder = ""
j = i
@timsegraves
timsegraves / gist:3831334
Created October 4, 2012 03:38
Austin Reverse Diag
// Reverse Diagonal
for (int i = 0; i < space; i++){
System.out.print(num + " ");
num++;
for(int j = 0; j < space; j++){
if (j + i == 5) {
System.out.print(" *");
}
else {
- if provisions.count > 0
%table.table.table-striped.table-bordered.tablesorter
%thead
%tr
%th ID
%th Username
%th Email
%th Package
%th Created Date
%th Actions