Skip to content

Instantly share code, notes, and snippets.

View rch317's full-sized avatar
🎯
Focusing

Rob Hough rch317

🎯
Focusing
  • Indianapolis, IN
View GitHub Profile
@rch317
rch317 / splunk_policy.json
Created November 19, 2019 14:05
splunk_policy.json
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"sqs:GetQueueAttributes",
"sqs:ListQueues",
"sqs:ReceiveMessage",
"sqs:GetQueueUrl",
sudo su -
cd /var/db
mv ConfigurationProfiles ConfigurationProfilesOLD
/usr/local/bin/jamf removeFramework
reboot
@rch317
rch317 / gist:216993538c66c68238cb58ef36baeb94
Created September 13, 2019 15:28
TF Interview Questions
// This Terraform code will fail. Aside from the obvious (no provider information, etc)...
// Please explain why this would fail, and what you can do to fix it?
// Policy template to be applied to our S3 bucket.
data "template_file" "policy" {
template = file("${path.module}/policy.tpl")
vars = {
bucket_name = aws_s3_bucket.bucket.id
@rch317
rch317 / mfa_explanation.md
Created July 3, 2019 18:06
AWS MFA Script Explanation

So - the basics. First my script assumes that you already have the AWS CLI tool configured and ready to go. That would mean you have an .aws directory, with at least a config and credentials file:

.aws/credentials

[default]
aws_access_key_id = ANACCESSKEYIDGOESHERE
@rch317
rch317 / docker-compose.yml
Created April 10, 2019 23:54
docker compose for htpc setup
version: '2'
services:
nginx-proxy:
image: jwilder/nginx-proxy:latest
container_name: nginx-proxy
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
ports:
- 80:80
restart: always

Keybase proof

I hereby claim:

  • I am rch317 on github.
  • I am robhoughkar (https://keybase.io/robhoughkar) on keybase.
  • I have a public key ASCDCnF-TvFIcSy0XYcycVbGlHJWbDRbXnvSax-gSwr7Iwo

To claim this, I am signing this object:

@rch317
rch317 / web.json
Created April 27, 2018 19:35
web service example
{"service": {"name": "web", "tags": ["rails"], "port": 80,
"check": {"args": ["curl", "localhost"], "interval": "10s"}}}
@rch317
rch317 / ping.json
Created April 27, 2018 19:35
ping service
{"check": {"name": "ping",
"args": ["ping", "-c1", "google.com"], "interval": "30s"}}
@rch317
rch317 / config.json
Last active April 27, 2018 19:33
demo-server config.json
{
"server": true,
"datacenter": "dc01",
"bootstrap_expect": 3,
"data_dir": "/var/consul",
"encrypt": "oUnNCn3ylbbFy0FP9QQLYg==",
"log_level": "INFO",
"retry_join": ["provider=aws tag_key=\"Consul Cluster\" tag_value=dc01"],
"leave_on_terminate": true,
"enable_script_checks": true,
@rch317
rch317 / consul.sh
Created April 26, 2018 18:08
consul init script
#!/bin/bash
#
# consul Manage the consul agent
#
# chkconfig: 2345 95 85
# description: Consul is a tool for service discovery and configuration
# processname: consul
# config: /etc/consul.d
# pidfile: /var/run/consul.pid