Skip to content

Instantly share code, notes, and snippets.

@mits87
mits87 / Time-based-auto-scaling-on-fargate.md
Created March 16, 2021 23:15 — forked from toricls/Time-based-auto-scaling-on-fargate.md
Example: Time-based Auto Scaling on Amazon ECS + AWS Fargate

Set parameters

$ export ECS_CLUSTER_NAME={YOUR_ECS_CLUSTER_NAME}
$ export ECS_SERVICE_NAME={YOUR_ECS_SERVICE_NAME}

RegisterScalableTarget

@mits87
mits87 / watermark.rb
Created August 15, 2012 09:57 — forked from xxx/watermark.rb
Paperclip watermarking processor
module Paperclip
class Watermark < Processor
# Handles watermarking of images that are uploaded.
attr_accessor :current_geometry, :target_geometry, :format, :whiny, :convert_options, :watermark_path, :watermark_offset, :overlay, :position
def initialize file, options = {}, attachment = nil
super
geometry = options[:geometry]
@file = file
@crop = geometry[-1,1] == '#'