Skip to content

Instantly share code, notes, and snippets.

View BlueDoge's full-sized avatar

Liz Clements BlueDoge

View GitHub Profile
@BlueDoge
BlueDoge / SecureStringExtensions.cs
Created April 27, 2023 23:05
Some secure string wizardry
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Security;
using System.Runtime.InteropServices;
namespace BlueDogeTools.AWS.Framework.Utilities
{
@BlueDoge
BlueDoge / libremetaverse-builder.Dockerfile
Created November 24, 2022 22:37
Creates the binaries in the image, run it and then copy out the packaged data from /buildenv/pkg/
FROM mcr.microsoft.com/dotnet/sdk:7.0-alpine
#build out our structure, git will populate 'src' later
RUN mkdir -p /buildenv/bin
RUN mkdir -p /buildenv/pkg
WORKDIR /buildenv
#pull down the source
RUN git clone https://github.com/cinderblocks/libremetaverse.git src
@BlueDoge
BlueDoge / Get-EC2InstancesWithPrivateIpAddresses.ps1
Last active July 27, 2022 19:01
Another EC2 Instance Grabber that pairs InstanceIds with PrivateIpAddresses
#Created by Elizabeth Clements in 2022
#License MIT
$AWSRegion = 'us-west-2'
$AWSProfileLocation = ("$env:USERPROFILE\.aws\credentials")
$AWSProfileName = 'default'
# grab clipboard, let it parse it to an array if multilined
$ClipboardData = Get-Clipboard
@BlueDoge
BlueDoge / PLinkIntoEC2Instances.ps1
Created July 15, 2022 08:46
Jump into EC2 Instances with plink and scp a tar.bz2 to the home\tmp folder
#Created by Elizabeth Clements in 2022
#License MIT
$AWSRegion = 'us-west-2'
$AWSProfileLocation = ("$env:USERPROFILE\.aws\credentials")
$AWSProfileName = 'default'
#Should resolve to <working_directory>\plink-commands.txt
$PLink_CommandFilePath = ((Get-Location | Select-Object Path -ExpandProperty Path) + "\plink-commands.txt")
@BlueDoge
BlueDoge / Get-AllCloudwatchAlarms.ps1
Created July 14, 2022 22:26
Display alarm data, let user select alarms, then data dump
#Originally created by Liz Clements in 2022
#License: MIT
$AWSRegion = 'us-west-2'
$AWSProfileLocation = ("$env:USERPROFILE\.aws\credentials")
$AWSProfileName = 'default'
#Grab Composites
$AlarmData_Composite = Get-CWAlarm `
-ProfileLocation $AWSProfileLocation -ProfileName $AWSProfileName -Region $AWSRegion `
@BlueDoge
BlueDoge / Get-AllEC2InstancesWithAlarmTypes.ps1
Last active July 15, 2022 01:32
Get all AWS EC2 Instances that lack a cloudwatch metric or composite alarm
#Originally created by Liz Clements in 2022
#License: MIT
$AWSRegion = 'us-west-2'
$AWSProfileLocation = ("$env:USERPROFILE\.aws\credentials")
$AWSProfileName = 'default'
#Grab all alarms, that have instance ids directly associated with them
$AlarmData = (Get-CWAlarm `
-ProfileLocation $AWSProfileLocation -ProfileName $AWSProfileName -Region $AWSRegion) `
@BlueDoge
BlueDoge / PuTTYIntoEC2Instances.ps1
Created July 14, 2022 01:11
Spawn multiple PuTTY instances to connect to multiple AWS EC2 Instances via Powershell
#Originally created by Liz Clements in 2022
#License: MIT
$AWSRegion = 'us-west-2'
$AWSProfileLocation = ("$env:USERPROFILE\.aws\credentials")
$AWSProfileName = 'default'
$ListOfInstances = (Get-EC2Instance -Region $AWSRegion -ProfileLocation $AWSProfileLocation -ProfileName $AWSProfileName).Instances `
| Select-Object `
@{Name="ServerAlias"; Expression={$_.Tags | Where-Object Key -eq "Name" | Select-Object Value -ExpandProperty Value}} `
@BlueDoge
BlueDoge / AWSUpdater.ps1
Last active July 12, 2022 22:13
Super simple AWS Updater, for specific modules, in Powershell
#Created by Elizabeth Clements in 2022
#License MIT
#Change this to the packages you want installed...
[String[]]$ModulesToInstall = `
"EC2", "S3" `
, "ElasticLoadBalancingV2", "SecretsManager" `
, "Route53", "CloudWatch", "CloudWatchLogs", "RDS" `
@BlueDoge
BlueDoge / GrabAllEC2Instances.ps1
Last active July 12, 2022 19:05
Grabs all EC2 instances in the hard coded AWS Region, and outputs desired fields
#Created by Elizabeth Clements in 2022
#License MIT
$AWSRegion = 'us-west-2'
$AWSProfileLocation = ("$env:USERPROFILE\.aws\credentials")
$AWSProfileName = 'default'
$ListOfInstances = (Get-EC2Instance -Region $AWSRegion -ProfileLocation $AWSProfileLocation -ProfileName $AWSProfileName).Instances `
| Select-Object `
@{Name="ServerAlias"; Expression={$_.Tags | Where-Object Key -eq "Name" | Select-Object Value -ExpandProperty Value}} `
from diagrams import Cluster, Diagram
from diagrams.aws.compute import LambdaFunction
from diagrams.aws.database import DDB
from diagrams.aws.storage import SimpleStorageServiceS3BucketWithObjects, S3Glacier
from diagrams.aws.network import Route53, APIGateway, APIGatewayEndpoint, ElasticLoadBalancing
from diagrams.aws.integration import Eventbridge, SQS
with Diagram("Second Life Marketplace ANS Processor on AWS", show=False):
with Cluster("Data Control"):
dns = Route53("DNS Records")