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
{ | |
"StartAt": "Start", | |
"States": { | |
"Start": { | |
"Type": "Task", | |
"Resource": { "Ref": "LambdaFunctionProductionAlias" }, | |
"Parameters": { | |
"context.$": "$$", | |
"parameters.$": "$" | |
}, |
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 | |
## Sourced from: https://www.reddit.com/r/aws/comments/df6uip/comment/f85pcoy/?utm_source=share&utm_medium=web2x&context=3 | |
# Help text | |
help() | |
{ | |
echo "" | |
echo " -o | --override Override port forwarding values." | |
echo " Syntax:[local port] [remote host address] [remote port]" |
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" { |
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 is also a config rule: https://eu-west-2.console.aws.amazon.com/lambda/home?region=eu-west-2#/create/app?applicationId=arn:aws:serverlessrepo:eu-west-1:922723803004:applications/Elastic-IP-Config-Rule | |
const { Route53, EC2, config } = require('aws-sdk'); | |
config.region = 'eu-west-1'; | |
async function findDanglingElasticIpAddresses(dryRun = true) { | |
const route53 = new Route53(); | |
let hostedZoneIds; | |
try { | |
console.log('Looking up hosted zones:'); |
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
{ | |
headers: { | |
date: 'Tue, 15 Sep 2020 04:16:02 GMT', | |
server: 'Apache', 'content-length': '223', | |
'x-via': 'haproxy-www-xfba,haproxy-edge-dub-73iu', | |
'content-type': 'text/html; charset=iso-8859-1' | |
}, | |
data: `<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> | |
<html> | |
<head> |
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 | |
currentState=`nmcli connection | grep SeedBox | tr -s ' ' | cut -f4 -d' '` | |
if [ "${currentState}" = "--" ] | |
then | |
nmcli connection up SeedBox | |
#service firewalld start | |
else |
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 node | |
const util = require('util'); | |
const { spawn: spawnAsync, exec } = require('child_process'); | |
const execAsync = util.promisify(exec); | |
const fs = require('fs').promises; | |
// Remove first two args with are name of node, and name of file | |
process.argv.shift(); | |
process.argv.shift(); |
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
{ | |
"AWSTemplateFormatVersion": "2010-09-09", | |
"Description": "Store and process user surveys", | |
"Parameters": { | |
"serviceName": { | |
"Type": "String", | |
"Description": "The name of the microservice" | |
}, | |
"deploymentBucketName": { | |
"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
const xs = document.createElement('div'); | |
xs.setAttribute('class', 'd-inline d-sm-none'); | |
const sm = document.createElement('div'); | |
sm.setAttribute('class', 'd-none d-sm-inline d-md-none'); | |
const md = document.createElement('div'); | |
md.setAttribute('class', 'd-none d-md-inline d-lg-none'); | |
const lg = document.createElement('div'); |
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 |