[version, account, eni, source, destination, srcport, destport="22", protocol="6", packets, bytes, windowstart, windowend, action="REJECT", flowlogstatus]
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
| ############### | |
| # Purges all cache in CloudFlare from AWS Lambda | |
| # I use this script when GitHub pushes new content to my S3 bucket | |
| # Requirements: | |
| # * CloudFlare API Global Key saved in the Parameter Store as 'CloudFlare' | |
| # * Environment variables: | |
| # ** 'email' as your CloudFlare email to use | |
| # ** 'cf_api' as your CloudFlare API URL | |
| # ** 'topic' as your SNS topic to send notifications | |
| # CloudFlare Doc: https://api.cloudflare.com/#zone-purge-all-files |
I hereby claim: * I am csereno on github. * I am csereno (https://keybase.io/csereno) on keybase. * I have a public key ASDM--9IKfrC1z0VN8aIh2vvEtrCMq-SfJm1EyzlinIxbQo To claim this, I am signing this object:
{ "body": { "key": { "eldest_kid": "0120ccfbef4829fac2d73d1537c688876bef12dac232af927c99b5132ce58a72316d0a", "host": "keybase.io", "kid": "0120ccfbef4829fac2d73d1537c688876bef12dac232af927c99b5132ce58a72316d0a", "uid": "e618dbcce09215c6f5fa8c5104f44e19", "username": "csereno" }, "merkle_root": { "ctime": 1568948993, "hash": "6bd244737d6b82979cd5adc287be5b623fa90beda43d1c5555ead9eb177d73134fcf88fb743c6262de6b4bb04cf50f01aefd64998806cf6f774c2c4069a01f5e", "hash_meta": "983886bef1e821df6c66edd4fbadefd7eccbe10a9017642452d809a02a78cf2c", "seqno": 7626147 }, "service": { "entropy": "NilApc9vJQeeUjBxjHAwO9kY", "name": "github", "username": "csereno" }, "type": "web_service_bi
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
| # Source: https://aws.amazon.com/blogs/networking-and-content-delivery/adding-http-security-headers-using-lambdaedge-and-amazon-cloudfront/ | |
| 'use strict'; | |
| exports.handler = async (event, context, callback) => { | |
| const response = event.Records[0].cf.response; | |
| const headers = response.headers; | |
| //Set new headers | |
| headers['strict-transport-security'] = [{key: 'Strict-Transport-Security', value: 'max-age=63072000; includeSubdomains; preload'}]; | |
| headers['content-security-policy'] = [{key: 'Content-Security-Policy', value: "default-src 'none'; img-src 'self'; script-src 'self'; style-src 'self'; object-src 'none'"}]; |
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
| # /etc/systemd/system/rclone-unifi.service | |
| [Unit] | |
| Description=Unifi S3 Sync (rclone) | |
| Wants=network-online.target | |
| After=network-online.target | |
| [Service] | |
| Type=notify | |
| User=unifi-video | |
| Group=unifi-video |
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
| # For more details see https://rclone.org/s3/ | |
| [wasabi] | |
| type = s3 | |
| provider = Wasabi | |
| access_key_id = xxxxx | |
| secret_access_key = xxx | |
| region = us-east-1 | |
| endpoint = s3.wasabisys.com |
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
| SubnetCIDR: | |
| AllowedPattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$ | |
| ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28 | |
| Default: 10.0.0.0/20 | |
| Description: CIDR block for subnet | |
| Type: String |
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
| $SearchDir = "C:\Source\Dir\" | |
| $Filenames = Get-Content C:\filelist.txt | |
| $Pics = Get-ChildItem -Path $SearchDir -File -Recurse | |
| foreach ($File in $Filenames) { | |
| $File = ($File.split('\')[-1]) #Gets just the file name | |
| if(Get-Childitem -Path $SearchDir -Include $File -File -Recurse -ErrorAction SilentlyContinue) { | |
| echo File Found: $File | |
| }else{ | |
| echo Not Found: $File >> C:\NotFoundLog.txt |
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
| # CW Alarm Template | |
| # | |
| # Author: Chris Sereno | |
| # Description: This template creates or adds CW alarms to EC2 Instances and will restart and recover instances. | |
| # There are requirements to instance recovery. See https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-recover.html | |
| # This is a personal test template and is NOT a vetted or approved template. Use at your own risk. | |
| # | |
| --- | |
| AWSTemplateFormatVersion: '2010-09-09' | |
| Description: 'CloudWatch Alarms to recover EC2 Template' |
OlderNewer