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
sudo /bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=1024 | |
sudo /sbin/mkswap /var/swap.1 | |
sudo chmod 600 /var/swap.1 | |
sudo /sbin/swapon /var/swap.1 |
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
1. To delete an index from ES | |
Searchkick.client.indices.delete(index: name) | |
2. To promote new index | |
Product.search_index.promote(index_name) |
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
ssh-add ~/.ssh/KEY_PAIR_NAME.pem |
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
# Install Git needed for Git based gems | |
packages: | |
yum: | |
git: [] | |
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
import boto3 | |
s3 = boto3.resource('s3') | |
bucket = s3.Bucket('bucket_name_here') | |
for obj in bucket.objects.filter(Prefix='folder_name_here'): | |
obj.Acl().put(ACL='public-read') |
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
1.) Reinitialize git repository once: | |
git init | |
2.) Use the following the command to push the staged changes only: | |
eb deploy --staged |
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
For deploying the code from your IAM profile: | |
1.) Create credentials file at ~/.aws/credentials | |
[default] | |
aws_access_key_id = YOUR_ACCESS_KEY | |
aws_secret_access_key = YOUR_SECRET_KEY | |
2.) Create config file at ~/.aws/config | |
[default] | |
region=us-east-1 | |
3.) appName > .elasticbeanstalk > config.yml |
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
################# Getting started ################## | |
1.) pip install boto3 | |
2.) Create credentials file at ~/.aws/credentials | |
[default] | |
aws_access_key_id = YOUR_ACCESS_KEY | |
aws_secret_access_key = YOUR_SECRET_KEY | |
3.) Create config file at ~/.aws/config | |
[default] | |
region=us-east-1 | |
#################################################### |
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
1.) wget https://bootstrap.pypa.io/get-pip.py | |
2.) sudo python get-pip.py | |
3.) sudo apt-get update | |
3.) sudo apt-get install build-essential libssl-dev libffi-dev python-dev libxml2-dev libxslt1-dev libldap2-dev libsasl2-dev libpq-dev python-dev | |
4.) sudo pip install Scrapy | |
5.) sudo pip install scrapyd |