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
from boto.dynamodb2 import connect_to_region | |
from boto.provider import Provider | |
aws_settings_provider = Provider('aws') | |
def create_connection(): | |
aws_region = # get the AWS region of the EC2 instance | |
# connect_to_region passes along the named arguments to the DynamoDBConnection class that gets created | |
return connect_to_region( |
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/bash -e | |
# -e means exit if any command fails | |
DBHOST=address.to.your.server | |
DBUSER=username | |
DBPASS=password # do this in a more secure fashion | |
DBNAME=DBNAME | |
GITREPO=/where/is/your/repo | |
DUMP=$GITREPO/where/you/store/dumps | |
NEW=$DUMP/schema.sql | |
OLD=$NEW.old |
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
### BEGIN INIT INFO | |
# Provides: Xvfb | |
# Required-Start: $local_fs $remote_fs | |
# Required-Stop: | |
# X-Start-Before: | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Loads X Virtual Frame Buffer | |
### END INIT INFO |