📂 repo_root/
📄 Jenkinsfile (has no file extension, references tasks in xx_BUILD_STEP folders below)
📂 01_BUILD/
📄 _build.sh
Dockerfile.build
(optional - add more files for BUILD stage here)
📂 02_UNIT_TESTS/
/**= | |
* User: zircote | |
* Date: 16/10/2013 | |
* Time: 08:59 | |
*/ | |
var SERVICE_HOST = 'http://aws.amazon.com' | |
var data_sources = { | |
"linux-od": { |
📂 repo_root/
📄 Jenkinsfile (has no file extension, references tasks in xx_BUILD_STEP folders below)
📂 01_BUILD/
📄 _build.sh
Dockerfile.build
(optional - add more files for BUILD stage here)
📂 02_UNIT_TESTS/
// 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 |
This is an example of how to use Terraform AWS registry modules with Terragrunt.
source
has to be full git URL and not Terraform Registry open issue #311main_providers.tf
is named so, because it will be copied to another local directory and merged with module's code. If such file exists in the module already then it will overwrite the one provided by the module.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\"}" | |
} |
/* | |
Go-Language implementation of an SSH Reverse Tunnel, the equivalent of below SSH command: | |
ssh -R 8080:127.0.0.1:8080 operatore@146.148.22.123 | |
which opens a tunnel between the two endpoints and permit to exchange information on this direction: | |
server:8080 -----> client:8080 |
import boto | |
import boto.s3 | |
import os.path | |
import sys | |
# Fill these in - you get them when you sign up for S3 | |
AWS_ACCESS_KEY_ID = '' | |
AWS_ACCESS_KEY_SECRET = '' | |
# Fill in info on data to upload |
import boto3 | |
# you can assign role in the function like below | |
# ROLE_ARN = 'arn:aws:iam::01234567890:role/my_role' | |
# | |
# or you can pass role as an evironment varibale | |
# ROLE_ARN = os.environ['role_arn'] | |
ROLE_ARN = = os.environ['role_arn'] |
import requests | |
from requests.adapters import HTTPAdapter | |
from requests.packages.urllib3.util.retry import Retry | |
with requests.Session() as s: | |
retries = Retry( | |
total=10, | |
backoff_factor=0.2, | |
status_forcelist=[500, 502, 503, 504]) |
This concept is very much like .jar
or .war
archives in Java.
NOTE: The built
.pyz
zipapp can run on both Python 2 & 3 but you can only build.pyz
zipapps with Python 3.5 or later.