Skip to content

Instantly share code, notes, and snippets.

View kenwdelong's full-sized avatar

Ken DeLong kenwdelong

View GitHub Profile
@veselosky
veselosky / s3gzip.py
Last active May 8, 2023 21:42
How to store and retrieve gzip-compressed objects in AWS S3
# 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
@robhruska
robhruska / MapMerge.groovy
Created January 23, 2013 19:55
Merge nested maps together
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 March 18, 2012 12:48
Filter for reading and logging HttpServletRequest body, and resetting the input stream
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;