Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:

Piotr Krajewski mits87

:octocat:
View GitHub Profile
@mits87
mits87 / Time-based-auto-scaling-on-fargate.md
Created Mar 16, 2021 — forked from toricls/Time-based-auto-scaling-on-fargate.md
Example: Time-based Auto Scaling on Amazon ECS + AWS Fargate
View Time-based-auto-scaling-on-fargate.md

Set parameters

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

RegisterScalableTarget

@mits87
mits87 / watermark.rb
Created Aug 15, 2012 — forked from xxx/watermark.rb
Paperclip watermarking processor
View watermark.rb
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] == '#'