Skip to content

Instantly share code, notes, and snippets.

@greenantdotcom
greenantdotcom / Taming application logs
Created January 23, 2019 22:05
Splunk wrangling - SSNR and AKG
T/K
@greenantdotcom
greenantdotcom / Description.md
Created July 2, 2015 23:45
Java example for caching and composition

Purpose

I understand why we would want to have the database be queried if we have, say, a cache Miss/Mrs./Ms. or a cache-hard-down, but I would suggest a more Interface-oriented/Compositional approach, like the below which may end up being more testable and with a consistent interface for cients.

input {
file {
type => syslog
path => "/var/log/messages"
}
}
filter {
grok {
type => syslog
@greenantdotcom
greenantdotcom / README.markdown
Created October 7, 2012 21:31 — forked from lukemorton/README.markdown
init.d file for statsd and carbon on rhel
Fork of https://gist.github.com/1071989
Further CentOS 5.x instructions customized by MJH

Ideally do this as SUDO

yum install -y git gcc gcc-c++ zlib-devel curl curl-devel openssl

Install node

TK - replace with nodejs-stable YUM instructions
@greenantdotcom
greenantdotcom / gist:3350269
Created August 14, 2012 15:27
Renaming a git branch

Say you're on a branch named BEFOURE-310 and you want to fix the typo. Renaming the branch is this simple:

git br --move BEFOUR-310

@greenantdotcom
greenantdotcom / gist:3261017
Created August 5, 2012 01:29
How to test SNI on a server using openssl and s_client
openssl s_client -connect antbox:8401 -servername zoodeals.com
@greenantdotcom
greenantdotcom / gist:3085766
Created July 10, 2012 19:45
Confirm key, CSR, and certificates all have the same modulus (which should confirm that they all share the same key)
### View a key's information
openssl rsa -in key -noout -modulus
### View a CSR's information
openssl req -in csr -noout -modulus
### View a certificate's information
@greenantdotcom
greenantdotcom / gist:2312141
Created April 5, 2012 15:59
Reading and writing to plists from the command line

Why?

When working on a remote machine, or a machine that doesn't have a GUI plist editor on it, the command line may be your only or best option.

There are two options present on OS X to help you.

default

Using the default command on OS X can help you get around.

@greenantdotcom
greenantdotcom / s3.markdown
Created March 28, 2012 21:55
Setting public read-only ACL for uploaded files

Alternatively, in the Amazon interface, you can select a directory or file, and click on the action "Mark as public"

@greenantdotcom
greenantdotcom / gist:2208996
Created March 26, 2012 19:34
How to unf*@# a git push
###
### DO NOT DO THIS IF YOU ARE NOT COMFORTABLE WITH WHAT YOU ARE DOING.
###
### ONCE YOU START MAKING FORCIBLE CHANGES ON YOUR LOCAL OR HOSTED REPOS, YOU MAY NOT BE ABLE TO UNDO YOUR UNDOs SO GO SLOWLY AND MAKE URE YOU DO THE RIGHT THING
###
### ------------------------------------------------------------------
### Reference: http://stackoverflow.com/questions/1270514/undoing-a-git-push#1270608