C02STG51GTFM:localstack mpandit$ make infra
. .venv/bin/activate; exec localstack/mock/infra.py
Starting local dev environment. CTRL-C to quit.
Starting local Elasticsearch (port 4571)...
Starting mock ES service (port 4578)...
Starting mock S3 server (port 4572)...
Starting mock SNS server (port 4575)...
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
| #!/bin/bash | |
| sudo add-apt-repository -y ppa:git-core/ppa | |
| sudo apt-get update | |
| sudo apt-get install git -y |
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
| # app/config/deploy.rb | |
| # Most of the changes specific to your environment will be set in | |
| # the `app/config/deploy/[env].rb` files. | |
| # define multiple deployments | |
| set :stages, %w(production staging) | |
| set :default_stage, "staging" |
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
| guard :rspec, cmd: 'zeus rspec --color' do | |
| watch(%r{^spec/.+_spec\.rb$}) | |
| watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" } | |
| watch('spec/spec_helper.rb') { "spec" } | |
| # Rails example | |
| watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" } | |
| watch(%r{^app/(.*)(\.erb|\.haml)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" } | |
| watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] } | |
| watch(%r{^spec/support/(.+)\.rb$}) { "spec" } |
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
| guard 'spork', :rspec_env => { 'RAILS_ENV' => 'test' } do | |
| watch('config/application.rb') | |
| watch('config/environment.rb') | |
| watch(%r{^config/environments/.+\.rb$}) | |
| watch(%r{^config/initializers/.+\.rb$}) | |
| watch(%r{^config/locales/.+\.yml$}) | |
| watch('Gemfile') | |
| watch('Gemfile.lock') | |
| watch('spec/spec_helper.rb') | |
| end |
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
| require 'rubygems' | |
| require 'spork' | |
| # This code runs once when you run your test suite | |
| Spork.prefork do | |
| ENV['RAILS_ENV'] ||= 'test' | |
| # Mongoid models reload | |
| require 'rails/mongoid' | |
| Spork.trap_class_method(Rails::Mongoid, :load_models) |
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
| batch_size = 100 # Items per request | |
| parallel_requests = 4 | |
| total_items_to_request = 4000 | |
| iterations = (total_items_to_request / (parallel_requests * batch_size)) # => 10 | |
| parallel_requests.times do |seg| | |
| Process.fork do | |
| c = AWS::DynamoDB::Client.new( | |
| :access_key_id => "...", |
AWS query-instance_method docs
export AWS_ACCESS_KEY_ID=‘XXXX’
export AWS_SECRET_ACCESS_KEY=‘XXXX’# ENV['AWS_ACCESS_KEY_ID']
# ENV['AWS_SECRET_ACCESS_KEY']NewerOlder