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
mkdir c:\temp | |
Write-Host("Install Hotfix to allow .Net 3.5 installation") | |
Invoke-WebRequest http://download.microsoft.com/download/8/0/8/80894270-D665-4E7A-8A2C-814373FC25C1/NDPFixit-KB3005628-X64.exe -OutFile c:\temp\NDPFixit-KB3005628-X64.exe | |
Start-Process "c:\temp\NDPFixit-KB3005628-X64.exe" -NoNewWindow -Wait | |
Write-Host("Enabling .NET Framework 3.5") | |
Import-Module ServerManager | |
Add-WindowsFeature Net-Framework-Core | |
Copy c:\vagrant\en_sql_server_2014_standard_edition_x64_dvd_3932034.iso c:\temp\ |
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
def regsearch(regpath): | |
r = wmi.Registry () | |
result, names = r.EnumKey ( | |
hDefKey=_winreg.HKEY_LOCAL_MACHINE, | |
sSubKeyName="SOFTWARE\Microsoft\NET Framework Setup\NDP" | |
) | |
return names | |
''' Confirm that .Net4 and the required security patch are installed | |
This is a really crappy check, we're pulling a list of .NET versions |
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 | |
check=`curl -s --data "zapnummer=$1&pbAbfragen=Auskunft" https://www10.muenchen.de/EATWebSearch/Auskunft` | |
if echo $check | egrep -q "liegt noch nicht zur Abholung bereit" ; then | |
logger -s "Blue Card for $2 is Not Ready yet" | |
elif echo $check | egrep -q "green" ; then | |
/Applications/terminal-notifier.app/Contents/MacOS/terminal-notifier -title "Blue Card" -subtitle "Check Status" -message "The Blue Card for $2 is ready!" | |
fi |
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
' ----------------------------------------------------------------- | |
' Syntax: cscript collectsysteminfo.vbs file | |
' Author: Ahmed Osman | |
' Date: September 14, 2011 | |
' Description: | |
' Supply the script with a list of DNS machine names and it will retrieve basic system details | |
'------------------------------------------------------------------ | |
Option Explicit |
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
for pid in `pidof nginx`; do echo "$(< /proc/$pid/cmdline)"; egrep 'files|Limit' /proc/$pid/limits; echo "Currently open files: $(ls -1 /proc/$pid/fd | wc -l)"; echo; done |
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/sh | |
# This script will monitor another HA node and take over an Elastic IP (EIP) | |
# if communication with the other node fails | |
# Based off the failover scenario and script available here: | |
# https://aws.amazon.com/articles/2127188135977316 | |
# High Availability IP variables | |
# Other node's IP to ping and EIP to swap if other node goes down | |
HA_Node_IP= | |
EIP= |
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 argparse, yaml | |
def region(regiondict): | |
for i in regiondict: | |
print(i) | |
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
policy_condition = Join("", ["arn:aws:ec2:", Ref("AWS::AccountId"), ":vpc/" ,Ref(VPC)]) | |
t.add_resource( | |
Role( | |
"natEc2Role", | |
Path="/", | |
AssumeRolePolicyDocument= | |
{ "Statement": [ { | |
"Effect": "Allow", | |
"Principal": { "Service": [ "ec2.amazonaws.com" ] }, |
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
import boto3 | |
import argparse | |
def main(): | |
argparser = argparse.ArgumentParser(description='Testing ARN stuff') | |
argparser.add_argument("--role", help="If running with a role provide it here", required=True) | |
argparser.add_argument("--profile", help="Credential profile", required=True) | |
argparser.add_argument('--region', help='AWS Region to work within, defaults to eu-central-1', default='eu-central-1', required=False) | |
args = argparser.parse_args() | |
role = args.role |
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
__author__ = 'ahmed' | |
import boto3, botocore | |
import argparse | |
def get_vpcid(sitename, client): | |
response = client.describe_vpcs( | |
Filters = [{ | |
'Name': 'tag:Site', | |
'Values': [ |
OlderNewer