- Using a ready-to-use Ubuntu image
# taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/ | |
# generate server.pem with the following command: | |
# openssl req -new -x509 -keyout key.pem -out server.pem -days 365 -nodes | |
# run as follows: | |
# python simple-https-server.py | |
# then in your browser, visit: | |
# https://localhost:4443 | |
import http.server |
sudo curl -L -o /usr/local/bin/aws-vault https://github.com/99designs/aws-vault/releases/download/v4.2.0/aws-vault-linux-amd64 | |
sudo chmod 755 /usr/local/bin/aws-vault |
#!/usr/bin/env python | |
# required pip packages: lxml, beautifulsoup4, tabulate | |
from bs4 import BeautifulSoup as BS | |
import urllib2 | |
import ssl | |
import urllib | |
from tabulate import tabulate |
resource "aws_lambda_function" "service" { | |
# Your usual aws_lambda_function configuration settings here | |
tracing_config { | |
mode = "Active" | |
} | |
} |
resource "aws_secretsmanager_secret" "IRCSecrets" { | |
name = "irc/client/credentials" | |
description = "My IRC client credentials" | |
} | |
resource "aws_secretsmanager_secret_version" "IRCCredentials" { | |
secret_id = "${aws_secretsmanager_secret.IRCSecrets.id}" | |
secret_string = "{\"username\":\"AzureDiamond\",\"password\":\"hunter2\"}" | |
} |
// https://blog.crashtest-security.com/lambda-edge-to-configure-http-security-headers-for-cloudfront-34a44775061d | |
'use strict'; | |
exports.handler = (event, context, callback) => { | |
const response = event.Records[0].cf.response; | |
const headers = response.headers; | |
// Add security headers |
version: '2' | |
services: | |
api: | |
volumes: | |
- "nfsmount:${CONTAINER_DIR}" | |
volumes: | |
nfsmount: | |
driver: local | |
driver_opts: |
""" | |
Forked and heavily adappted from: | |
https://gist.github.com/kitwalker12/517d99c3835975ad4d1718d28a63553e | |
Copies all keys from the source Redis host to the destination Redis host. | |
Useful to migrate Redis instances where commands like SLAVEOF and MIGRATE are | |
restricted (e.g. on Amazon ElastiCache). | |
The script scans through the keyspace of the given database number and uses | |
a pipeline of DUMP and RESTORE commands to migrate the keys. |
Many aircraft that offer wifi only permit access to machines on port 80/443, the standard http(s) ports. If you want to SSH, you have to set up an intermediate machine that hosts the SSH service on either port 80 or 443. An easy (and free) way to do this is via a Google free-tier micro instance. These instances have a 1 GB transfer ceiling per month, but so long are you are only transmitting textual data a few days per month, this limit should not be easily exceeded. Set up one of these VMs via the Google Cloud console, and select CentOS 7 as the disk image. Make sure that you allow http/https traffic on the instance, the two checkboxes in the Firewalls section of the VM settings. Optionally, set a static external IP address for your server in the VM config, in case you don't want to look up the IP each time. Then, ssh into the new VM (the IP address will be listed as the "external IP" in the list of instances) and edi