Skip to content

Instantly share code, notes, and snippets.

Avatar

Ken DeLong kenwdelong

View GitHub Profile
@veselosky
veselosky / s3gzip.py
Last active Sep 26, 2022
How to store and retrieve gzip-compressed objects in AWS S3
View s3gzip.py
# vim: set fileencoding=utf-8 :
#
# How to store and retrieve gzip-compressed objects in AWS S3
###########################################################################
#
# Copyright 2015 Vince Veselosky and contributors
#
# 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
@skx
skx / graphite_send
Last active Mar 28, 2022
Shell script to submit "metrics" to graphite.
View graphite_send
#!/bin/sh
#
# About
# -----
# This script sends simple system-metrics to a remote graphite server.
#
#
# Metrics
# -------
# The metrics currently include the obvious things such as:
@robhruska
robhruska / MapMerge.groovy
Created Jan 23, 2013
Merge nested maps together
View MapMerge.groovy
class MapMerge {
/**
* Deeply merges the contents of each Map in sources, merging from
* "right to left" and returning the merged Map.
*
* Mimics 'extend()' functions often seen in JavaScript libraries.
* Any specific Map implementations (e.g. TreeMap, LinkedHashMap)
* are not guaranteed to be retained. The ordering of the keys in
@calo81
calo81 / LoggerFilter
Created Mar 18, 2012
Filter for reading and logging HttpServletRequest body, and resetting the input stream
View LoggerFilter
package com.paddypower.financials.market.management.rest.logging;
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import javax.servlet.Filter;
import javax.servlet.FilterChain;