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
daemon off; | |
worker_processes auto; | |
events { worker_connections 1024; } | |
http { | |
sendfile on; |
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
# auto mfa | |
complete -W "$(ls -1 ~/.aws/*.mfa | awk -F "/" '{print $5}' | sed -e 's/\.mfa$//')" mfa | |
function mfa () { | |
oathtool --base32 --totp "$(cat ~/.aws/$1.mfa)" | pbcopy ; | |
} | |
# manual mfa | |
function mmfa () { | |
oathtool --base32 --totp "$1" ; |
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
<seelog type="adaptive" mininterval="2000000" maxinterval="100000000" critmsgcount="500" minlevel="info"> | |
<exceptions> | |
<exception filepattern="test*" minlevel="error"/> | |
</exceptions> | |
<outputs formatid="fmtinfo"> | |
<console formatid="fmtinfo"/> | |
<rollingfile type="size" filename="/var/log/message" maxsize="30000000" maxrolls="5"/> | |
<custom name="cloudwatch_receiver" formatid="fmtjs" data-log-group="/aws/ssm/demolog"/> | |
</outputs> | |
<formats> |
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 | |
export AWS_DEFAULT_PROFILE=zzzzzz | |
BUCKET=xxxxx | |
# DIRS="$HOME/.bash_profile $HOME/.gitconfig $HOME/.aws $HOME/.ssh $HOME/.bashrc $HOME/.gnupg $HOME/.bash_history" | |
DIRS="$HOME/.bash_profile $HOME/.gitconfig $HOME/.aws $HOME/.ssh $HOME/.bashrc $HOME/.gnupg $HOME/.bash_history $HOME/git" | |
echo "Backup $DIRS.." |
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: 0.2 | |
env: | |
variables: | |
RCLONE_CONFIG_PUBLIC_TYPE: "http" | |
RCLONE_CONFIG_S3_TYPE: "s3" | |
RCLONE_CONFIG_S3_PROVIDER: "AWS" | |
RCLONE_CONFIG_S3_ENV_AUTH: "true" | |
RCLONE_CONFIG_S3_REGION: "eu-central-1" |
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
{ | |
"EngineConfiguration":{ | |
"PollInterval":"00:00:15", | |
"Components":[ | |
{ | |
"Id":"ApplicationEventLog", | |
"FullName":"AWS.EC2.Windows.CloudWatch.EventLog.EventLogInputComponent,AWS.EC2.Windows.CloudWatch", | |
"Parameters":{ | |
"LogName":"Application", | |
"Levels":"1" |
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 python | |
import boto3 | |
import json | |
import sys | |
def find_public_addresses(ec2): | |
public_instances = {} | |
instance_public_ips = {} | |
instance_private_ips = {} | |
instance_ident = {} |
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: Automatically validate ACM requests from this account | |
ACMApproverRole: | |
Type: "AWS::IAM::Role" | |
Properties: | |
AssumeRolePolicyDocument: | |
Version: "2012-10-17" | |
Statement: | |
- Effect: Allow |
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
<powershell> | |
$password = (Get-SSMParameter -Name /ds/svc_password -WithDecryption $true).Value | ConvertTo-SecureString -asPlainText -Force | |
$username = (Get-SSMParameter -Name /ds/svc_user -WithDecryption $true).Value | |
$credential = New-Object System.Management.Automation.PSCredential($username,$password) | |
$instanceID = invoke-restmethod -uri http://169.254.169.254/latest/meta-data/instance-id | |
Add-Computer -domainname example.com -ComputerName $instanceID -Credential $credential -Passthru -Verbose -Force -Restart | |
</powershell> |
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
# source https://github.com/radekg/terraform-provisioner-ansible | |
image: | |
name: rflume/terraform-aws-ansible:latest | |
stages: | |
# 'global' stages | |
- validate global | |
- plan global | |
- apply global | |
# Dev env stages |