This file contains 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 python3 | |
import time | |
import twitter | |
DELAY = 1 | |
# Get your's here: https://developer.twitter.com/en/apps | |
api = twitter.Api( | |
consumer_key='', |
This file contains 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 python3 | |
# Example output: | |
# ############### | |
# | |
# GRA1: LV1 -> G131B11: | |
# 1 server down 15min 0sec ago | |
# ERI1: LV1 -> E101D14: | |
# 1 server down 15min 0sec ago | |
# WAW1: LV1 -> W16A12: |
This file contains 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 python3 | |
__author__ = "unbelauscht" | |
__license__ = "GPL" | |
__version__ = "0.0.1" | |
__maintainer__ = "unbelauscht" | |
__status__ = "Development" | |
from urllib.request import Request, urlopen, ssl, socket | |
from urllib.error import URLError, HTTPError | |
from datetime import datetime, timezone |
This file contains 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 | |
count=0 | |
while `aws ecs describe-services --cluster ${CLUSTER_NAME} --services ${SERVICE_NAME} --region ${AWS_REGION} | \ | |
jq -r '.services[].deployments[] | .status' | grep ACTIVE 2>&1 > /dev/null` | |
do | |
if ! (( count % 3 )); then | |
echo "$count: Waiting for deployment task to finish"; | |
fi | |
let "count=count+1" |
This file contains 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
resource "aws_iam_user_policy" "bucket_access" { | |
name = "bucket_access" | |
user = aws_iam_user.bucket_user.name | |
policy = <<EOF | |
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "terraform0", |
This file contains 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://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener_rule#path_pattern | |
resource "aws_lb_listener_rule" "redirect" { | |
listener_arn = aws_lb_listener.listener.arn | |
action { | |
type = "redirect" | |
redirect { | |
port = "443" |
This file contains 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
resource "aws_iam_instance_profile" "ssm_role" { | |
name = "ssm_role" | |
role = aws_iam_role.ssm_role.name | |
} | |
resource "aws_iam_role" "ssm_role" { | |
name = "ssm-role" | |
assume_role_policy = jsonencode( | |
{ |
This file contains 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
plugin: aws_ec2 | |
regions: | |
- eu-central-1 | |
# filter hosts based on name tag. This was used to provision prometheus instances | |
filters: | |
tag:Name: "prometheus.*" | |
# get nicer hostnames based on the ec2 instance tag |
This file contains 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
plugin: aws_ec2 | |
regions: | |
- eu-central-1 | |
# filter hosts based on name tag. This was used to provision prometheus instances | |
filters: | |
tag:Name: prometheus.* | |
# get nicer hostnames based on the ec2 instance tag |
This file contains 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
resource "aws_lb_listener_rule" "website" { | |
listener_arn = aws_lb_listener.https.arn | |
priority = 99 | |
dynamic "action" { | |
for_each = var.website_enable_sso ? [1] : [] | |
content { | |
type = "authenticate-oidc" | |
authenticate_oidc { |
OlderNewer