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
$auth = @() | |
$auth += New-UDAuthenticationMethod -Endpoint { | |
param([PSCredential]$Credential) | |
$userName = $Credential.UserName | |
$role = if ($userName -eq 'Adam') { | |
'admin' | |
} else { | |
'luser' | |
} | |
$Token = Grant-UDJsonWebToken -Identity $UserName -Role $Role -Issuer 'Adam' |
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 PSWordCloud | |
$WordClouds = "$PSScriptRoot/wordclouds" | |
$Folder = Publish-UDFolder -Path "$PSScriptRoot/wordclouds" -RequestPath "/wordclouds" | |
Start-UDDashboard -Dashboard (New-UDDashboard -Title 'Dashboard' -Content { | |
New-UDInput -Title "Generate Diagram" -Content { | |
New-UDInputField -Type 'file' -Name 'file' | |
} -Endpoint { | |
param($file) |
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 PSWriteHTML | |
$DiagramPath = "$PSScriptRoot/pswritehtml" | |
$Folder = Publish-UDFolder -Path "$PSScriptRoot/pswritehtml" -RequestPath "/pswritehtml" | |
Start-UDDashboard -Dashboard (New-UDDashboard -Title 'Dashboard' -Content { | |
New-UDInput -Title "Generate Diagram" -Endpoint { | |
param($Color) | |
New-HTML -TitleText 'My diagram' -UseCssLinks -UseJavaScriptLinks -FilePath $DiagramPath\diagram.html { |
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 PSWriteHTML | |
New-HTML -TitleText 'My diagram' -UseCssLinks -UseJavaScriptLinks -FilePath $PSScriptRoot\pswritehtml\diagram.html { | |
New-HTMLPanel { | |
New-HTMLDiagram { | |
New-DiagramNode -Label 'One node' -To 'Second node','Third node' -ColorBackground Bisque | |
New-DiagramNode -Label 'Second node' | |
New-DiagramNode -Label 'Third node' | |
} | |
} |
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
$Html = (& { | |
div { | |
New-UDHeading -Text "Hey" | |
} | |
}) -join '' | |
New-UDHtml -Markup $Html |
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
$Html = (& { | |
h1 "This is h1 Title in header" | |
div { | |
p { | |
"This is simply a paragraph in a div." | |
} | |
h1 "This is h1" | |
h2 "This is h2" | |
h3 "This is h3" |
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
New-UDHtml -Markup (h1 "My favorites Fruits") |
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
PS C:\> h1 "My favorites Fruits" | |
<h1 >My favorites Fruits</h1> |
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( | |
$DockerUserName = "", | |
$DockerPassword = "", | |
$ShareUserName = "", | |
$SharePassword = "", | |
$ServicePrincipalName = "", | |
$ServicePrincipalPassword = "" | |
) | |
$azurePassword = ConvertTo-SecureString $ServicePrincipalPassword -AsPlainText -Force |
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($TagName = '1.0.2') | |
docker tag myImage adamdriscoll/myImage:$TagName | |
docker login -u adamdriscoll -p $Env:dockerpwd | |
docker push adamdriscoll/myImage:$TagName |