Skip to content

Instantly share code, notes, and snippets.

@rschreijer
rschreijer / MetricRegistryJsonProtocol.scala
Last active September 17, 2019 23:53
spray-json protocol for the Metric lib. Serializes a MetricRegistry and/or single Metric objects from Spray. See https://dropwizard.github.io/metrics, https://github.com/spray/spray-json
package spray.json.examples
import java.util.concurrent.TimeUnit
import scala.collection.JavaConverters._
import scala.util.{Try, Success, Failure}
import com.codahale.metrics._
import spray.json._
@afternoon
afternoon / elb-sg-config.yaml
Created April 14, 2013 20:34
Security group and load balancer config file for Elastic Beanstalk. See http://tmblr.co/ZU9VxvibvDWI.
# vim: ft=yaml
# Elastic Load Balancer and Security Group configuration for the app
#
# - Allow anyone to connect to port 443 and office traffic to connect to
# port 22
# - Ensure all traffic is encrypted by configuring load balancer to listen on
# 443 and direct traffic to port 443 on app servers
# - Enable cookie-based session stickiness
# - Use /status for health check
# - Enable backend authentication policy by providing public key for cert