This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commands: | |
01_get_nginx_conf_file: | |
command: aws s3 cp s3://your-bucket-name/shared_config/an_nginx_http.conf /home/ec2-user | |
container_commands: | |
01_move_nginx_conf_file: | |
command: mv -f /home/ec2-user/an_nginx_http.conf /etc/nginx/conf.d/an_nginx_http.conf | |
02_reload_nginx: | |
command: "sudo service nginx reload" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Dont forget to set the env variable "certdomain", and either fill in your email below or use an env variable for that too. | |
# Also note that this config is using the LetsEncrypt staging server, remove the flag when ready! | |
Resources: | |
sslSecurityGroupIngress: | |
Type: AWS::EC2::SecurityGroupIngress | |
Properties: | |
GroupId: {"Fn::GetAtt" : ["AWSEBSecurityGroup", "GroupId"]} | |
IpProtocol: tcp | |
ToPort: 443 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Setup linux packages | |
option_settings: | |
- option_name: BUNDLE_DISABLE_SHARED_GEMS | |
value: "1" | |
- option_name: BUNDLE_PATH | |
value: "vendor/bundle" | |
packages: | |
yum: | |
curl: [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Watermarking image with another image using Imagemagick 'composite', 'watermark' and 'dissolve'. | |
require "rubygems" | |
require "RMagick" | |
require "pry" | |
include Magick | |
# Read the image in the memory with RMagick | |
puts "What is the image file you want to watermark?" | |
puts "Drag and drop the file here or enter the full path to the image" | |
path = gets.chomp |