Skip to content

Instantly share code, notes, and snippets.

View daveRendon's full-sized avatar
🎯
Focusing

Dave Rendon daveRendon

🎯
Focusing
View GitHub Profile
@daveRendon
daveRendon / pichincha.bicep
Created June 14, 2024 14:09
pichincha.bicep
param location string = 'eastus'
param resourceGroupName string = 'rg-skytap-poc'
param storageAccountName string = 'stskytappoc'
@allowed([
'new'
'existing'
])
param newOrExisting string = 'existing'
@daveRendon
daveRendon / skytap.bicep
Created June 13, 2024 23:12
skytap.bicep
param location string = 'eastus'
param resourceGroupName string = 'skytap'
param storageAccountName string = 'skytapsa0021'
@allowed([
'new'
'existing'
])
param newOrExisting string = 'existing'
@daveRendon
daveRendon / install-iis.ps1
Last active May 11, 2024 23:13
install-iis
powershell.exe Install-WindowsFeature -name Web-Server -IncludeManagementTools && powershell.exe remove-item "C:\\inetpub\\wwwroot\\iisstart.htm" && powershell.exe Add-Content -Path "C:\\inetpub\\wwwroot\\iisstart.htm" -Value $($env:computername)
New-StoragePool -FriendlyName storagepool1 -StorageSubsystemFriendlyName "Windows Storage*" -PhysicalDisks (Get-PhysicalDisk -CanPool $true)
New-VirtualDisk -StoragePoolFriendlyName storagepool1 -FriendlyName virtualdisk1 -Size 2046GB -ResiliencySettingName Simple -ProvisioningType Fixed
Initialize-Disk -VirtualDisk (Get-VirtualDisk -FriendlyName virtualdisk1)
New-Partition -DiskNumber 4 -UseMaximumSize -DriveLetter Z
New-StoragePool -FriendlyName storagepool1 -StorageSubsystemFriendlyName "Windows Storage*" -PhysicalDisks (Get-PhysicalDisk -CanPool $true)
New-VirtualDisk -StoragePoolFriendlyName storagepool1 -FriendlyName virtualdisk1 -Size 64GB -ResiliencySettingName Simple -ProvisioningType Fixed
Initialize-Disk -VirtualDisk (Get-VirtualDisk -FriendlyName virtualdisk1)
New-Partition -DiskNumber 4 -UseMaximumSize -DriveLetter Z
@daveRendon
daveRendon / nginx.yaml
Created January 18, 2024 20:24
nginx-service-sample
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
spec:
selector:
matchLabels:
app: nginx
replicas: 2 # tells deployment to run 2 pods matching the template
template:
@daveRendon
daveRendon / bicep-subscription-deploy.ps1
Created January 16, 2024 20:49
Bicep deploy - target subscription
$date = Get-Date -Format "MM-dd-yyyy"
$rand = Get-Random -Maximum 1000
$deploymentName = "AzInsiderDeployment-"+"$date"+"-"+"$rand
New-AzDeployment -Name $deploymentName -TemplateFile .\main.bicep -TemplateParameterFile .\azuredeploy.parameters.json -c
@daveRendon
daveRendon / cloudbrink-install.ps1
Last active January 15, 2024 18:28
cloudbrink-install
# URL of the installer file
$url = "https://cloudbrink.blob.core.windows.net/scripts/BrinkAgent-latest.msi"
# Location to save the installer file
$output = "C:\Users\azureuser\Downloads\BrinkAgent-latest.msi"
# Create a WebClient object
$wc = New-Object System.Net.WebClient
# Download the installer file
$wc.DownloadFile($url, $output)
@daveRendon
daveRendon / create-certs.sh
Created November 21, 2023 13:45
create-certs.sh - create self-signed certificates. This creates a .txt file for each .PFX and .CRT file. The .txt file includes the Base64 encoded version of the certificate. Be sure the domain used in the parameters file matches the hostname of the certificates. For example, if the certificates were created using *.contoso.net, the parameters f…
#!/bin/bash
CUSTOM_DOMAIN=$1
if [[ -z $CUSTOM_DOMAIN ]]
then
echo "Parameters missing."
echo "Usage: create-certificates.sh custom_domain"
echo "Try: create-certificates.sh *.contoso.net"
exit
@daveRendon
daveRendon / appRegistrationAndPermission.ps1
Created September 22, 2023 11:42
appRegistrationAndPermission.ps1
[CmdletBinding()]
param (
[string] $clientName,
[string] $apiName,
[string] $resourceGroup,
[string] $staticWebURL
)
az config set extension.use_dynamic_install=yes_without_prompt