Instantly share code, notes, and snippets.

View gist:c17fdb0eb306b9746c9aa157236fab99
variable "region" {}
variable "profile" {}
provider "aws" {
region = "${var.region}"
profile = "${var.profile}"
version = "~> 1.0"
}
View COUS_TEST
#!/bin/bash
# Takes URL as an argument
# Send a very large cookie to test for Cookies Of Unusual Size
curl -v --cookie "foo=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
View dummyNginxConfig
server {
listen 80;
server_name _;
location / {
add_header Content-Type text/plain;
return 200 'yo';
}
}
View example of variable path in consul
#####################################################
# Consul Generated # {{ $role := env "ROLE" }} # {{ $role_tree := printf "%q" (print "mysql-proxy/" $role "/settings") | replaceAll "\"" "" }}
#####################################################
OPTIONS="{{range tree $role_tree }} --{{.Key}}={{.Value}}{{end}}"
View Pulling User Data from EC2 Instance
#!/usr/bin/env ruby
require 'json'
require 'uri'
require 'yaml'
require 'net/http'
require 'getoptlong'
args = {
:yaml => false,
View gist:225c4d3107fa505edcb8
input {
file {
path => "/home/chris/Code/LS_TEST/logstash-1.4.2/b.log"
type => "json_haproxy"
sincedb_path => "/tmp/since"
codec => "json"
}
}
View gist:e98a02e7362309835854
### Keybase proof
I hereby claim:
* I am maguec on github.
* I am maguec (https://keybase.io/maguec) on keybase.
* I have a public key whose fingerprint is 713C 9A7F DD19 C992 3C2A F870 78B0 7C7D 855E B038
To claim this, I am signing this object:
View gist:5177489
sudo apt-get install python-cairo python-memcache python-sqlite memcached python-django-tagging python-django libapache2-mod-python apache2 libapache2-mod-wsgi git-core python-pyparsing python-tz libdbd-mysql-perl libmysqlclient-dev libmysqlclient18 mysql-client-5.5 mysql-client-core-5.5 mysql-common python-mysqldb
mkdir -p /var/tmp/software
cd /var/tmp/software
git clone https://github.com/graphite-project/graphite-web.git
git clone https://github.com/graphite-project/carbon.git
git clone https://github.com/graphite-project/whisper.git
for i in whisper carbon graphite-web; do
View gist:5177442
###############################################################
# Puppet Controlled Default Template
###############################################################
FQDNLookup false
LoadPlugin syslog
<Plugin syslog>
LogLevel info
</Plugin>
LoadPlugin cpu
LoadPlugin disk
View squid_collectd.rb
#!/usr/bin/env ruby
require 'getoptlong'
require 'yaml'
#need to sync stdout with collectd execs!
$stdout.sync = true
if File.readable? '/etc/mcollective/facts.yaml'
facts=YAML::load(File.open('/etc/mcollective/facts.yaml'))
else