Skip to content

Instantly share code, notes, and snippets.

<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="windowsPE">
<component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SetupUILanguage>
<UILanguage>en-US</UILanguage>
</SetupUILanguage>
<InputLocale>en-US</InputLocale>
<SystemLocale>en-US</SystemLocale>
<UILanguage>en-US</UILanguage>
@awsvpc
awsvpc / Autounattend.xml
Created December 25, 2023 23:25 — forked from ambakshi/Autounattend.xml
Diskpart script to create uefi partitions. Via https://technet.microsoft.com/en-us/library/Hh825686.aspx.
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="windowsPE">
<component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SetupUILanguage>
<UILanguage>en-US</UILanguage>
</SetupUILanguage>
<InputLocale>en-US</InputLocale>
<SystemLocale>en-US</SystemLocale>
<UILanguage>en-US</UILanguage>
@awsvpc
awsvpc / BundleConfig.ps1
Created December 25, 2023 23:33 — forked from mefellows/BundleConfig.ps1
Sysprepped Windows AMI using Packer
$EC2SettingsFile="C:\\Program Files\\Amazon\\Ec2ConfigService\\Settings\\BundleConfig.xml"
$xml = [xml](get-content $EC2SettingsFile)
$xmlElement = $xml.get_DocumentElement()
foreach ($element in $xmlElement.Property)
{
if ($element.Name -eq "AutoSysprep")
{
$element.Value="Yes"
}
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="windowsPE">
<!-- look for drivers on floppy -->
<component name="Microsoft-Windows-PnpCustomizationsWinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<DriverPaths>
<PathAndCredentials wcm:keyValue="1" wcm:action="add">
<Path>A:\</Path>
</PathAndCredentials>
</DriverPaths>
@awsvpc
awsvpc / oscap_centos8
Created January 2, 2024 02:16 — forked from dmccuk/oscap_centos8
install and configure OpenScap to work on Centos 8
### Install the required packages:
sudo yum install openscap-scanner scap-security-guide
### Can we run a report?
sudo oscap xccdf eval --profile xccdf_org.ssgproject.content_profile_ospp --report /tmp/report.html /usr/share/xml/scap/ssg/content/ssg-rhel8-ds.xml
first scan gives “notapplicable”
### Now do this…
sudo cp /usr/share/openscap/cpe/openscap-cpe-dict.xml /usr/share/openscap/cpe/openscap-cpe-dict.xml.dist
@awsvpc
awsvpc / billing-budgets-cloudwatch.tf
Created January 5, 2024 11:02 — forked from so0k/billing-budgets-cloudwatch.tf
Swatmobile - AWS Bootstrap gists
resource "aws_budgets_budget" "cloudwatch" {
provider = "aws.billing"
name = "budget-cloudwatch-monthly"
budget_type = "COST"
limit_amount = "1000"
limit_unit = "USD"
time_period_end = "2087-06-15_00:00"
time_period_start = "2017-07-01_00:00"
time_unit = "MONTHLY"
AWS Lambda functions and API gateway are often used to create serverless applications.
Function code is written in Go and deployed using Terraform.
@awsvpc
awsvpc / index.js
Created January 5, 2024 11:05 — forked from Paulo-Lopes-Estevao/index.js
Websocket node js client Authorization Bearer
const WebSocket = require('websocket').w3cwebsocket;
var token = "key-token";
const socket = new WebSocket('ws://localhost:8000/ws', null, null, {
Authorization: `Bearer ${token}`
});
socket.onopen = () => {
console.log('WebSocket connection established');
@awsvpc
awsvpc / main.tf
Created January 5, 2024 11:17 — forked from lkrimphove/main.tf
### LAMBDA
module "lambda_function" {
source = "terraform-aws-modules/lambda/aws"
function_name = "outdoor-activities-generator"
description = "Generates a map containing your outdoor activities"
handler = "main.lambda_handler"
runtime = "python3.11"
timeout = 60