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
| var AWS = require('aws-sdk'); | |
| var forwardFrom = '[email protected]'; | |
| var forwardTo = '[email protected]'; | |
| exports.handler = function(event, context) { | |
| var msgInfo = JSON.parse(event.Records[0].Sns.Message); | |
| // don't process spam messages | |
| if (msgInfo.receipt.spamVerdict.status === 'FAIL' || msgInfo.receipt.virusVerdict.status === 'FAIL') { | |
| console.log('Message is spam or contains virus, ignoring.'); |
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
| { | |
| "Version": "2012-10-17", | |
| "Statement": [ | |
| { | |
| "Sid": "AllowAllUsersToListAccounts", | |
| "Effect": "Allow", | |
| "Action": [ | |
| "iam:ListAccountAliases", | |
| "iam:ListUsers", | |
| "iam:GetAccountPasswordPolicy", |
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": 0, | |
| "size": 100, | |
| "version": true, | |
| "sort": [ | |
| { | |
| "_script": { | |
| "order": "desc", | |
| "type": "string", | |
| "script": { | |
| "lang": "painless", |
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
| # dpkg: error: version '-' has bad syntax: version string has embedd | |
| sudo apt -o Dpkg::Options::="--force-overwrite" install --fix-broken | |
| sudo ubuntu-drivers autoinstall |
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
| #!/usr/bin/env bash | |
| # Assuming the VPN connection name is SeedBox | |
| currentState=`nmcli connection | grep SeedBox | tr -s ' ' | cut -f4 -d' '` | |
| if [ "${currentState}" = "--" ] | |
| then | |
| nmcli connection up SeedBox | |
| else | |
| nmcli connection down SeedBox |
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
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| permissions: | |
| contents: write |
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
| locals { | |
| environment = "dev", | |
| vpc = { | |
| vpc_id = "VPC_ID", | |
| private_subnets = ["SUBNET_ID_1"] | |
| } | |
| } | |
| resource "aws_cloudwatch_log_group" "vpn_cloudwatch_log_group" { | |
| name = "/aws/vpn" |
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
| require('error-object-polyfill'); | |
| const Api = require('openapi-factory'); | |
| process.env.AWS_NODEJS_CONNECTION_REUSE_ENABLED = 1; | |
| require('http').globalAgent.keepAlive = true; | |
| require('https').globalAgent.keepAlive = true; | |
| const logger = require('./requestLogger'); | |
| try { | |
| const XrayManager = require('./xrayManager'); |
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
| du -h . | grep -E '^[^[:space:]]+(M|G)[[:space:]]' | sort -h |
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
| # https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html | |
| [default] | |
| region=us-east-1 | |
| output=json | |
| cli_binary_format=raw-in-base64-out | |
| cli_auto_prompt = on |