Skip to content

Instantly share code, notes, and snippets.

View johnaxel's full-sized avatar

John Matson johnaxel

  • Datadog
  • Nevada County, CA
View GitHub Profile
@johnaxel
johnaxel / main.go
Created September 10, 2017 23:09 — forked from kmshultz/main.go
Adds expvar and some dogstatsd to kubernete's examples/guestbook-go/main.go
/*
Copyright 2014 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
@johnaxel
johnaxel / example-lambda.py
Last active November 18, 2019 14:57 — forked from vagelim/example-lambda.py
Example Lambda to illustrate concepts in lambda blog post
import hashlib
import boto3
import time
## CONFIG ##
BUCKET = 'bucket-name'
FILEPATH = 'hashes'
SEP = '\t'
def log(metric_name, metric_type='count', metric_value=1, tags=[]):
---
kind: ReplicationController
apiVersion: v1
metadata:
name: redis-master
labels:
app: redis
role: master
spec:
replicas: 1
instances:
- host: localhost
port: 7100
cassandra_aliasing: true
# user: username
# password: password
# process_name_regex: .*process_name.* # Instead of specifying a host, and port. The agent can connect using the attach api.
# # This requires the JDK to be installed and the path to tools.jar to be set below.
# tools_jar_path: /usr/lib/jvm/java-7-openjdk-amd64/lib/tools.jar # To be set when process_name_regex is set
# name: cassandra_instance
instances:
- host: localhost
port: 7100
cassandra_aliasing: true
# user: username
# password: password
# process_name_regex: .*process_name.* # Instead of specifying a host, and port. The agent can connect using the attach api.
# # This requires the JDK to be installed and the path to tools.jar to be set below.
# tools_jar_path: /usr/lib/jvm/java-7-openjdk-amd64/lib/tools.jar # To be set when process_name_regex is set
# name: cassandra_instance
instances:
- host: localhost
port: 7100
cassandra_aliasing: true
# user: username
# password: password
# process_name_regex: .*process_name.* # Instead of specifying a host, and port. The agent can connect using the attach api.
# # This requires the JDK to be installed and the path to tools.jar to be set below.
# tools_jar_path: /usr/lib/jvm/java-7-openjdk-amd64/lib/tools.jar # To be set when process_name_regex is set
# name: cassandra_instance