This file contains 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
aws s3 ls --summarize --recursive s3://ooni-data/autoclaved/jsonl.tar.lz4/2018 | \ | |
awk '{print $3}' | \ | |
paste -sd+ - | \ | |
sed 's/\++/+/g' | \ | |
bc | |
=> 4413049840600 |
This file contains 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
#!/usr/bin/env ruby | |
require 'aws-sdk-resources' | |
require 'thor' | |
require 'fileutils' | |
require 'slack/post' | |
%w(aws_aki aws_sak aws_bucket aws_region postgres_url).each do |env_variable| | |
raise "Missing env variable: #{env_variable}" if ENV[env_variable].nil? | |
end |
This file contains 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
# The name of this file is autoscaling.config. .yml has been added for syntax highlighting. | |
# References: | |
# http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-options-general.html#command-options-general-elasticbeanstalksqsd | |
# http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html | |
# http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environment-resources.html | |
# Create manually first those 2 resources: | |
# * the SQS queue, here its name is: my-sqs-queue | |
# * the RDS Postgres database |