Skip to content

Instantly share code, notes, and snippets.

require 'RMagick'
class WatermarkMe
def initialize(app, args)
@app = app
@watermark_text, @mime_types = *args
@mime_types ||= %w[image/jpeg image/png image/gif]
end
def call(env)
@andreas
andreas / envelope_encryption.go
Created February 3, 2015 19:25
Envelope Encryption with Amazon KMS and Go
package main
import (
"bytes"
"crypto/rand"
"encoding/gob"
"fmt"
"io/ioutil"
"os"
"time"