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 | |
| root=~/Projects/printuridigital.ro | |
| src=$root/src | |
| dist=$root/dist | |
| what=$1 | |
| options_s3=$2 | |
| if [ -z $1 ]; then echo need file argument; exit; fi | |
| type=${1##*.} | |
| file_src=$src/$type/$what | |
| file_min=$dist/$type/$what |
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
| { | |
| "type": "record", | |
| "name": "amazon-log", | |
| "namespace": "com.streambright.avro", | |
| "fields": [{ | |
| "name": "bucket_owner", | |
| "type": "string", | |
| "doc": "The canonical user ID of the owner of the source bucket." | |
| }, { | |
| "name": "bucket", |
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 | |
| set -u | |
| set -e | |
| set -o pipefail | |
| export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin | |
| cat <<'EOF' > /etc/modprobe.d/blacklist-ipv6.conf |
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
| from __future__ import print_function | |
| import json | |
| import boto3 | |
| import logging | |
| #setup simple logging for INFO | |
| logger = logging.getLogger() | |
| logger.setLevel(logging.ERROR) |
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
| import boto3 | |
| import logging | |
| import json | |
| import gzip | |
| from StringIO import StringIO | |
| logger = logging.getLogger() | |
| logger.setLevel(logging.INFO) | |
| client = boto3.client('firehose') |
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
| import boto3 | |
| import logging | |
| from datetime import * | |
| #setup simple logging for INFO | |
| logger = logging.getLogger() | |
| logger.setLevel(logging.WARNING) | |
| #define the connection | |
| ec2 = boto3.resource('ec2', region_name="us-west-2") |
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
| import boto3 | |
| import logging | |
| #setup simple logging for INFO | |
| logger = logging.getLogger() | |
| logger.setLevel(logging.INFO) | |
| #define the connection | |
| ec2 = boto3.resource('ec2') |
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
| import boto3 | |
| import logging | |
| import datetime | |
| import re | |
| import time | |
| #setup simple logging for INFO | |
| logger = logging.getLogger() | |
| logger.setLevel(logging.ERROR) |
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
| ''' | |
| This script performs efficient concatenation of files stored in S3. Given a | |
| folder, output location, and optional suffix, all files with the given suffix | |
| will be concatenated into one file stored in the output location. | |
| Concatenation is performed within S3 when possible, falling back to local | |
| operations when necessary. | |
| Run `python combineS3Files.py -h` for more info. | |
| ''' |
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
| #resides in app/models/connectors/ | |
| class Connectors::Aws | |
| attr_reader :aws_access_key_id, :aws_secret_access_key, :aws_security_token, :expires_at | |
| def initialize | |
| if ENV.has_key?('AWS_SECURITY_TOKEN') #localhost | |
| @aws_access_key_id = ENV['AWS_ACCESS_KEY_ID'] | |
| @aws_secret_access_key = ENV['AWS_SECRET_ACCESS_KEY'] | |
| @aws_security_token = ENV['AWS_SECURITY_TOKEN'] | |
| @expires_at = Time.now + 10.hours |