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
import boto3 | |
awsaccntid = '123456789123' | |
targetrole = 'LISTCERTSSTSROLE' | |
## GET CREDENTIALS | |
def fn_assume_role(awsaccntid, targetrole): | |
client = boto3.client('sts') | |
response = client.assume_role( | |
RoleArn="arn:aws:iam::" + awsaccntid + ":role/" + targetrole, |
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
Service Information | |
service: guarddutysignup | |
stage: dev | |
region: us-east-1 | |
stack: guarddutysignup-dev | |
resources: 36 | |
api keys: | |
mykey6: OGyJrKhQHUHNOWAYNOTSHARINGITdEpUc | |
endpoints: | |
functions: |
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
service: guarddutysignup | |
custom: | |
stage: ${opt:stage, self:provider.stage} | |
memberRoleName: CrossAccountManageGuardDutyRole #The name of the role that will be assumed in member accounts | |
provider: | |
name: aws | |
runtime: python3.6 | |
stage: dev #default stage |
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
[ | |
{ | |
"clientName": "BobSmith", | |
"clientID": "22oi5qjafaflklkjklajlf", | |
"postconf": "CanvasCatalog", | |
"group": "MRH3" | |
}, | |
{ | |
"clientName": "ToddHarris", | |
"clientID": "i5qj3klq23rhljkna.nmaf", |
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
for x in range(1, 101): | |
if (x % 5 == 0) and (x % 3 == 0): | |
print('FizzBuzz') | |
elif x % 5 == 0: #means x is exactly divisible by 5, therefor it is a multiple of 5 | |
print('Buzz') | |
elif x % 3 == 0: | |
print('Fizz') | |
else: | |
print(x) |
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
- name: "Ensure that virtual machine exists in VMC SDDC" | |
vmware_guest: | |
datacenter: "SDDC-Datacenter" | |
hostname: "{{ vsphere_server }}" | |
username: "{{ vsphere_user }}" | |
password: "{{ vsphere_password }}" | |
validate_certs: no | |
folder: "/SDDC-Datacenter/vm/Workloads" | |
name: "ansible-test-rhel-Demo1" | |
annotation: "This is a test VM created by Ansible" |
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
- name: "Ensure that virtual machine exists in VMC SDDC" | |
vmware_guest: | |
datacenter: "SDDC-Datacenter" | |
hostname: "{{ vsphere_server }}" | |
username: "{{ vsphere_user }}" | |
password: "{{ vsphere_password }}" | |
validate_certs: no | |
folder: "/SDDC-Datacenter/vm/Workloads" | |
name: "ansible-test-rhel-Demo1" | |
annotation: "This is a test VM created by Ansible" |
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
# Written by Dane Fetterman on 12/1/2016 | |
# https://aws.amazon.com/blogs/compute/monitor-cluster-state-with-amazon-ecs-event-stream/ | |
# Where they use a cloud watch event from ECS to notify a SNS topic. We're | |
# sending a notification directly to slack instead | |
import requests | |
import json | |
from boto3 import session, client |
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 | |
# myapp daemon | |
# chkconfig: 345 20 80 | |
# description: myapp daemon | |
# processname: myapp | |
DAEMON_PATH="/usr/local/src/logstash/bin" | |
DAEMON=logstash | |
DAEMONOPTS="-f /etc/logstash/logstash.conf" |
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
{ | |
"title": "Logstash HTTP Statistics", | |
"services": { | |
"query": { | |
"idQueue": [ | |
1, | |
2, | |
3, | |
4, | |
5, |
NewerOlder