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
| setup: | |
| pipenv sync --dev | |
| gen_requirements: | |
| pipenv lock --pre --requirements > requirements.txt | |
| gen_requirements_dev: | |
| pipenv lock --pre --requirements --dev > requirements-dev.txt | |
| .PHONY: build test |
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 base64 import encodebytes | |
| from nacl import encoding, public | |
| import os | |
| import sys | |
| import json | |
| import requests | |
| from requests.auth import HTTPBasicAuth | |
| import pdb | |
| from pprint import pprint |
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
| Enter passphrase to unlock /home/myoung/.awsvault/keys/: | |
| START RequestId: dc50d08f-abb0-4595-ad81-f6be4072b18a Version: $LATEST | |
| [INFO] 2019-11-01T15:19:13.523Z dc50d08f-abb0-4595-ad81-f6be4072b18a Processing event | |
| { | |
| "version": "0", | |
| "id": "2c3c00aa-c836-0af2-1225-b74a3e8a1aaa", | |
| "detail-type": "AWS API Call via CloudTrail", | |
| "source": "aws.elasticloadbalancing", | |
| "account": "1234567890", | |
| "time": "2019-11-01T15:19:06Z", |
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 | |
| [[ $(ps aux | grep rsync | grep -vE 'grep.*rsync' | wc -l) -gt 0 ]] || ( \ | |
| rsync -avzh --chmod=a=rw seedbox:~/finished /volume1/Misc/seedbox/ && \ | |
| ssh seedbox "rm -rf ~/finished/*" && \ | |
| find /volume1/Misc/seedbox/ -type d -exec chmod 777 {} \; && \ | |
| curl -X POST http://192.168.2.113:9898?message=Finished%20rsync \ | |
| ) | |
| tv_dir="/volume1/TV" | |
| movie_dir="/volume1/Movies/Pending" |
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
| # -*- coding: utf-8 -*- # pylint: disable=superfluous-parens,F823 import boto3 import requests import os |
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 python:alpine AS cloudmapper | |
| EXPOSE 8000 | |
| WORKDIR /cloudmapper | |
| ENV ACCOUNT=$AWS_ACCOUNT | |
| ENV AWS_DEFAULT_REGION=$AWS_DEFAULT_REGION | |
| ENV AWS_REGION=$AWS_REGION | |
| RUN apk --no-cache --virtual build-dependencies add \ | |
| freetype-dev \ | |
| libpng-utils \ | |
| libpng-dev \ |
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
| { | |
| "apm-6.3.0": { | |
| "order": 1, | |
| "index_patterns": [ | |
| "apm-6.3.0-*" | |
| ], | |
| "settings": { | |
| "index": { | |
| "number_of_routing_shards": "30", | |
| "mapping": { |
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
| { | |
| "apm-6.3.0": { | |
| "order": 1, | |
| "index_patterns": [ | |
| "apm-6.3.0-*" | |
| ], | |
| "settings": { | |
| "index": { | |
| "number_of_routing_shards": "30", | |
| "mapping": { |
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
| - key: apm-transaction | |
| title: APM Transaction | |
| description: Transaction-specific data for APM | |
| fields: | |
| - name: transaction | |
| type: group | |
| dynamic: false | |
| fields: | |
| - name: name | |
| type: text |
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
| # -*- coding: utf-8 -*- | |
| import os, boto3, botocore | |
| S3BUCKET=os.environ.get('S3BUCKET', None) | |
| S3PREFIX=os.environ.get('S3PREFIX', 'rds/') | |
| LASTRECEIVEDFILENAME=os.environ.get('LASTRECEIVEDFILENAME', '.timestamp') | |
| def lambda_handler(event, context): | |
| log_file_data = "" |