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
# encoding: utf-8 | |
import os | |
import shelve | |
import boto.glacier | |
import boto | |
from boto.glacier.exceptions import UnexpectedHTTPResponseError | |
ACCESS_KEY_ID = "XXXXXXXXXXXXX" | |
SECRET_ACCESS_KEY = "XXXXXXXXXXX" | |
SHELVE_FILE = os.path.expanduser("~/.glaciervault.db") |
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
#!/bin/sh | |
user='root' | |
password='company' | |
adminmail='s.o@gmail.com' | |
> to_study.txt | |
> to_study_err.txt | |
mysqladmin -u$user -p$password debug | |
errorlog=`mysqladmin variables | grep log_error | awk '{print $4}'` |
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
# encoding: utf-8 | |
import os | |
import shelve | |
import boto.glacier | |
import boto | |
from boto.glacier.exceptions import UnexpectedHTTPResponseError | |
ACCESS_KEY_ID = "XXXXXXXXXXXXX" | |
SECRET_ACCESS_KEY = "XXXXXXXXXXX" | |
SHELVE_FILE = os.path.expanduser("~/.glaciervault.db") |
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
#!/bin/sh | |
cat > create_image.py << heredoc | |
import boto.ec2 | |
myami='ami-eba0f882' | |
mytype='t1.micro' | |
myvolume='vol-cf5d9282' |
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
# python s3upload.py /path/file.txt | |
import sys | |
myfile = sys.argv[1] | |
import os | |
onlyfile=os.path.split(myfile)[-1] | |
import boto | |
from boto.s3.connection import OrdinaryCallingFormat |
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/python | |
import boto | |
conn = boto.connect_redshift(aws_access_key_id='key', aws_secret_access_key='secret') | |
import datetime | |
mymonth = datetime.datetime.now().strftime("%b").lower() | |
myday = datetime.datetime.now().strftime("%d") | |
myvar = mymonth+myday+'-viva-mar5-deliveryreport-new' |
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/python | |
access_key='ABC' | |
secret_key='PQR+XYZ' | |
my_instance_type='t1.micro' | |
# following instance types are available | |
# t1.micro m1.small m1.medium m1.large m1.xlarge m3.xlarge m3.2xlarge m2.xlarge m2.2xlarge m2.4xlarge c1.medium c1.xlarge hi1.4xlarge hs1.8xlarge | |
my_security_groups='N-1-0-1-AutogenByAWSMP-' |
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
<?php | |
/* | |
POST / HTTP/1.1 | |
Host: kinesis.<region>.<domain> | |
x-amz-Date: <Date> | |
Authorization: AWS4-HMAC-SHA256 Credential=<Credential>, SignedHeaders=content-type;date;host;user-agent;x-amz-date;x-amz-target;x-amzn-requestid, Signature=<Signature> | |
User-Agent: <UserAgentString> | |
Content-Type: application/x-amz-json-1.1 | |
Content-Length: <PayloadSizeBytes> |
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
# put and get data | |
import boto | |
mykin = boto.connect_kinesis(aws_access_key_id='access', | |
aws_secret_access_key='passWord') | |
myput = mykin.put_record(stream_name='mytest', data='abcdefghij223344', | |
partition_key='parti11223344', b64_encode=True) | |
myiterator = mykin.get_shard_iterator(stream_name='mytest', | |
shard_id='shardId-000000000000', | |
shard_iterator_type='TRIM_HORIZON') |
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
#!/bin/sh | |
# copy the database source files to destination | |
dbname='palus' | |
source='/DATA/4GLV/tokudb/' | |
destip='192.168.150.137' | |
destuser='db' | |
destpass='db' | |
destport='3306' |