Skip to content

Instantly share code, notes, and snippets.

View maguec's full-sized avatar

Chris Mague maguec

View GitHub Profile
@maguec
maguec / ssl_enumerate_sentinel_masters.py
Created May 9, 2019 17:04
Using python and ssl to get list of sentinel masters
import redis
'''
The Cert comes from /etc/opt/redislabs/proxy_cert.pem!
'''
try:
conn = redis.StrictRedis(
host='HOSTNAME',
variable "region" {}
variable "profile" {}
provider "aws" {
region = "${var.region}"
profile = "${var.profile}"
version = "~> 1.0"
}
#!/bin/bash
# Takes URL as an argument
# Send a very large cookie to test for Cookies Of Unusual Size
curl -v --cookie "foo=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
server {
listen 80;
server_name _;
location / {
add_header Content-Type text/plain;
return 200 'yo';
}
}
#####################################################
# Consul Generated # {{ $role := env "ROLE" }} # {{ $role_tree := printf "%q" (print "mysql-proxy/" $role "/settings") | replaceAll "\"" "" }}
#####################################################
OPTIONS="{{range tree $role_tree }} --{{.Key}}={{.Value}}{{end}}"
#!/usr/bin/env ruby
require 'json'
require 'uri'
require 'yaml'
require 'net/http'
require 'getoptlong'
args = {
:yaml => false,
input {
file {
path => "/home/chris/Code/LS_TEST/logstash-1.4.2/b.log"
type => "json_haproxy"
sincedb_path => "/tmp/since"
codec => "json"
}
}
### 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:
@maguec
maguec / gist:5177489
Created March 16, 2013 17:50
Notes on installation of graphite
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
@maguec
maguec / gist:5177442
Created March 16, 2013 17:38
Example configuration for squid collectd exec
###############################################################
# Puppet Controlled Default Template
###############################################################
FQDNLookup false
LoadPlugin syslog
<Plugin syslog>
LogLevel info
</Plugin>
LoadPlugin cpu
LoadPlugin disk