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
# Install WIX toolset | |
Import-Module "C:\Program Files (x86)\WiX Toolset v3.11\bin\Microsoft.Deployment.Compression.dll" | |
Import-Module "C:\Program Files (x86)\WiX Toolset v3.11\bin\\Microsoft.Deployment.Compression.Cab.dll" | |
$cab = New-Object Microsoft.Deployment.Compression.Cab.Cabinfo "$home\Downloads\file\dotnet-sdk-5.0.404-win-x64_a943fac999a30b3eb83580112b793d37de0c0700.exe" | |
$cab.UnpackFile("0","C:\temp\0.xml") | |
$a = [xml](Get-Content "C:\temp\0.xml") | |
$guid = [guid]$a.BurnManifest.Registration.Id |
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
function Set-TaskbarIconSize { | |
# Sets the windows 11 task bar icon size. Default value is medium. | |
[CmdletBinding()] | |
param( | |
[validateset("small", "medium", "large")] | |
[string]$Size = "medium" | |
) | |
$sizeChart = @{ | |
"small" = 0 | |
"medium" = 1 |
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
AWSTemplateFormatVersion: "2010-09-09" | |
Description: > | |
https://twitch.tv/ruptwelve | |
Parameters: | |
EnvName: | |
Type: String | |
Description: Enter the name for your IDE | |
Default: please-change-me | |
Resources: | |
Oblak9: |
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
AWSTemplateFormatVersion: "2010-09-09" | |
Description: > | |
https://twitch.tv/ruptwelve | |
Parameters: | |
RepoName: | |
Type: String | |
Description: Enter the name for your repository | |
Default: please-change-me | |
Resources: | |
MyGitHubRepo: |
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 sys, os, base64, datetime, hashlib, hmac | |
import requests | |
import json | |
from typing import * | |
# based on the example python code found here: | |
# https://docs.aws.amazon.com/general/latest/gr/sigv4-signed-request-examples.html | |
# call this method to query all items for a given primary hash key in a table | |
# endpoint: the DynamoDB endpoint to query (for AWS servers, this is "https://dynamodb.{region}.amazonaws.com/") |
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
AWSTemplateFormatVersion: '2010-09-09' | |
Transform: AWS::Serverless-2016-10-31 | |
Description: > | |
Sample SAM Template using Application Auto Scaling + Provisioned Concurrency | |
Globals: | |
Function: | |
Timeout: 30 |
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
AWSTemplateFormatVersion: "2010-09-09" | |
Transform: AWS::Serverless-2016-10-31 | |
Description: > | |
your-api | |
SAM Template for your API | |
Globals: | |
Api: | |
Cors: |
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
using namespace System.Management.Automation | |
using namespace System.Text | |
class PSTextEncodingConverter : PSTypeConverter { | |
hidden | |
[hashtable] | |
$ConversionTable = @{ | |
'ASCII' = [System.Text.Encoding]::ASCII | |
'ANSI' = [System.Text.Encoding]::ASCII | |
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
CustomMetric: | |
Type: AWS::Logs::MetricFilter | |
Properties: | |
LogGroupName: !Sub /aws/lambda/${AWS::StackName} | |
FilterPattern: '[str="REPORT", ..., str="Max", str="Memory", str="Used:", MaxMemoryUsed, str="MB"]' | |
MetricTransformations: | |
- MetricNamespace: Organization/Project/Service | |
MetricName: MaxMemoryUsed | |
MetricValue: $MaxMemoryUsed |
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
# Recreation of the example found here: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ssm-document.html | |
$ssmDocContent = [PSCustomObject]@{ | |
schemaVersion = "1.2" | |
description = "Join instances to an AWS Directory Service domain." | |
parameters = @{ | |
directoryId = @{ | |
type = "String" | |
description = "(Required) The ID of the AWS Directory Service directory." | |
} |
NewerOlder