Skip to content

Instantly share code, notes, and snippets.

import boto3
import hashlib
import json
import urllib2
# Ports your application uses that need inbound permissions from the service for
INGRESS_PORTS = {
'web' : [80, 443],
'ssh': [22,]
import boto3
import hashlib
import json
import copy
import urllib2
# ID of the security group we want to update
SECURITY_GROUP_ID = "sg-XXXX"
# Description of the security rule we want to replace
#!/bin/bash
#
# /etc/rc.d/init.d/xvfbd
#
# chkconfig: 345 95 28
# description: Starts/Stops X Virtual Framebuffer server
# processname: Xvfb
#
@griggheo
griggheo / keybase.md
Created November 3, 2015 18:03
keybase.md

Keybase proof

I hereby claim:

  • I am griggheo on github.
  • I am griggheo (https://keybase.io/griggheo) on keybase.
  • I have a public key whose fingerprint is 0BDA 74F2 92A1 4044 0D22 974C 03A6 7437 7506 1608

To claim this, I am signing this object:

@griggheo
griggheo / check_pingdom_and_post_cachet_status.go
Created October 13, 2015 23:28
Golang program which integrates Pingdom checks into a Cachet status page
package main
import (
"github.com/russellcardullo/go-pingdom/pingdom"
"fmt"
"time"
)
const PINGDOM_USERNAME="xxxx"
filter {
grok {
add_tag => [ "valid" ]
match => { "message" => "%{APPLOGLINE}" }
}
json {
source => "payload"
}
if "valid" not in [tags] {
drop { }
input {
lumberjack {
port => 5000
type => "logs"
ssl_certificate => "/etc/pki/logstash/my_wildcard.crt"
ssl_key => "/etc/pki/logstash/my_wildcard.key"
}
}
filter {
if ([message] =~ /ping/) {
{
"network": {
"servers": [ "{{logstash_elasticsearch_host }}:{{ logstash_listen_port_tcp }}" ],
"ssl ca": "{{ logstash_forwarder_etc_dir }}/{{ ssl_cert }}", "timeout": 15
},
"files": [
{
"paths": [
"/var/log/syslog",
"/var/log/*.log"
@griggheo
griggheo / compare_env_v2.go
Created August 29, 2014 00:26
Version 2 of compare_env.go
package main
import (
"fmt"
"log"
"bytes"
"strings"
"flag"
"sort"
"os/exec"
@griggheo
griggheo / compare_env.go
Created August 28, 2014 21:04
Inspect differences between Chef environments on Chef server vs local filesystem
package main
import (
"fmt"
"log"
"bytes"
"strings"
"flag"
"sort"
"os/exec"