Adobe Document Cloud PDF Embed API
Add embed-pdf.html to the /layouts/shortcodes directory of your Hugo project.
| [Reflection.Assembly]::LoadWithPartialName('System.Web') | Out-Null | |
| $HMAC = New-Object System.Security.Cryptography.HMACSHA256 | |
| $EventHubsNamespace = '' | |
| $EventHubName = '' | |
| $EventHubEndpoint = "$EventHubsNamespace.servicebus.windows.net/$EventHubName" | |
| $AccessPolicyName = 'RootManageSharedAccessKey' | |
| $AccessPolicyKey = '' | |
| $SASExpirationTime = ([DateTimeOffset]::Now.ToUnixTimeSeconds()) + 3000 |
Adobe Document Cloud PDF Embed API
Add embed-pdf.html to the /layouts/shortcodes directory of your Hugo project.
| @( | |
| '- 23.45' | |
| '- 23.45' | |
| '- 23.4' | |
| '- 2.45' | |
| ) | ForEach-Object { $_ -replace '(-\s{1,})(\d{1,}\.\d{1,})', '-$2' } |
| $Date = Get-Date -Date '2022-01-01' | |
| $EndDate = Get-Date -Date '2022-03-31' | |
| $DateArray = do { | |
| $Date.ToString('yyyy-MM-dd') | |
| $Date = $Date.AddDays(1) | |
| } until ($Date -gt $EndDate) |
| $TableRecords = @() | |
| $StorageAccount = '' | |
| $Table = '' | |
| Connect-AzAccount | |
| $AZStorageToken = Get-AzAccessToken -ResourceUrl 'https://storage.azure.com' | |
| $AzTableHeaders = @{ | |
| Authorization = "$($AzStorageToken.Type) $($AzStorageToken.Token)" | |
| Accept = 'application/json;odata=nometadata' | |
| 'x-ms-version' = '2020-08-04' |
| # Define pattern to match | |
| $BranchPattern = 'bugfix/*' | |
| # Delete all branches matching the defined pattern | |
| git branch | Where-Object { $_.Trim() -like $BranchPattern } | ForEach-Object { git branch -d $_.Trim() } |
| #requires -version 7 | |
| $SourceKV = '' | |
| $DestinationKV = '' | |
| $SecretHash = Get-AzKeyVaultSecret -VaultName $SourceKV | ForEach-Object -Parallel { $Val = Get-AzKeyVaultSecret -VaultName $using:SourceKV -SecretName $_.Name -AsPlainText; [PSCustomObject]@{ Name = $_.Name; Value = $Val } } | |
| $SecretHash | ForEach-Object -Parallel { Set-AzKeyVaultSecret -VaultName $using:DestinationKV -SecretName $_.Name -SecretValue $(ConvertTo-SecureString -AsPlainText -Force -String $_.Value) } |
| # Uses the interactive authentication flow with a web browser | |
| Connect-MgGraph -Scopes 'Mail.Send' | |
| # Build email message object | |
| $Message = @{ | |
| subject = 'Test' | |
| toRecipients = @(@{ | |
| emailAddress = @{ | |
| address = '[email protected]' | |
| } |
| $ServerName = '' | |
| $DatabaseName = '' | |
| $Username = '' | |
| $Password = '' | |
| $QueryTables = 'SELECT name FROM sys.tables ORDER BY name' | |
| $Tables = Invoke-Sqlcmd -ServerInstance $ServerName -Database $DatabaseName -Username $Username -Password $Password -Query $QueryTables | Select-Object -ExpandProperty name | |
| New-Item -ItemType Directory -Name "$DatabaseName-Export" -Force | Out-Null |
| Connect-AzAccount | |
| foreach ($Subscription in $(Get-AzSubscription)) { | |
| Get-AZVM | ForEach-Object { | |
| [PSCustomObject]@{ | |
| Name = $_.Name | |
| ResourceGroupName = $_.ResourceGroupName | |
| Subscription = $Subscription.Name | |
| Location = $_.Location | |
| IPAddress = (Get-AzNetworkInterface -Name $_.NetworkProfile.NetworkInterfaces.Id.Split('/')[-1]).IpConfigurations.PrivateIpAddress | |
| OSType = $_.StorageProfile.OsDisk.OsType |