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
param ( | |
$Organization, | |
$PrivateToken, | |
$ProjectFullPath | |
) | |
$query = @{ | |
query = '{ |
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
$Body = [pscustomobject]@{ | |
properties = [pscustomobject]@{ | |
hardwareProfile = [pscustomobject]@{ | |
vmSize = 'Standard_D2s_v3' | |
} | |
} | |
} | ConvertTo-Json -Compress | |
$SubcriptionId = '' | |
$ResourceGroup = '' | |
$VMName = '' |
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
Start-PodeServer { | |
Add-PodeEndpoint -Address * -Port 3000 -Protocol Http | |
Set-PodeViewEngine -Type PSHTML -Extension PS1 -ScriptBlock { | |
param($path, $data) | |
return (. $path $data) | |
} | |
Add-PodeRoute -Method Get -Path '/' -ScriptBlock { | |
Write-PodeViewResponse -Path 'index.ps1' | |
} | |
Add-PodeRoute -Method Post -Path '/cost-estimation' -ScriptBlock { |
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
$Query = "Resources | |
| where type =~ 'microsoft.compute/virtualMachines' | |
| project id, VMName = tostring(name), Location = tostring(location), | |
ResourceGroup = tostring(resourceGroup), | |
SubscriptionId = tostring(subscriptionId), | |
OSType = tostring(properties.storageProfile.osDisk.osType), | |
PowerState = iff( | |
tostring( | |
split( | |
properties.extended.instanceView.powerState.code, '/' |
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
/*Every 45 Minutes*/ | |
{ | |
"bindings": [ | |
{ | |
"name": "Timer", | |
"type": "timerTrigger", | |
"direction": "in", | |
"schedule": "0 */45 * * * *" | |
} | |
] |
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-Module .\assemblies\PSHTML\PSHTML.psd1 | |
html -Content { | |
head -Content { | |
Title -Content "iCMS | Home" | |
Link -href "./../assets/css/metro.min.css" -rel "stylesheet" | |
Link -href "./../assets/css/metro-colors.min.css" -rel "stylesheet" | |
Link -href "./../assets/css/metro-rtl.min.css" -rel "stylesheet" | |
Link -href "./../assets/css/metro-icons.min.css" -rel "stylesheet" | |
script -src "./../assets/js/jquery-3.3.1.min.js" | |
script -src "./../assets/js/metro.min.js" |
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-Module Polaris -Verbose | |
Import-Module PSHTML -Verbose | |
Add-Type -AssemblyName System.Web | |
New-PolarisGetRoute -Path "/Login" -Scriptblock { | |
$HTML = html { | |
head { | |
Title "Login Page" | |
} |
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
Get-Date | ConvertTo-Json -Compress |
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
<!DOCTYPE html> | |
html(lang="en") | |
head | |
meta(charset="UTF-8") | |
meta(name="viewport", content="width=device-width, initial-scale=1.0") | |
meta(http-equiv="X-UA-Compatible", content="ie=edge") | |
title Wizard | |
style | |
include ./style/style.css | |
link(rel="stylesheet", href="https://fonts.googleapis.com/css?family=Raleway") |
NewerOlder