Skip to content

Instantly share code, notes, and snippets.

View MathieuBuisson's full-sized avatar

Mathieu BUISSON MathieuBuisson

View GitHub Profile
@MathieuBuisson
MathieuBuisson / outputs.txt
Created October 29, 2019 18:56
Pulumi stack with strange outputs
Outputs:
consulRule : {
rule: {
access : "Deny"
destinationAddressPrefix : "Internet"
destinationPortRanges : [
[0]: "1234"
]
direction : "Outbound"
id : "/subscriptions/53e77d8e-c18b-4040-846b-282ed557ee9a/resourceGroups/nsg-rgded2106c/providers/Microsoft.Network/networkSecurityGroups/frontend-subnet-nsg/securityRules/Deny_Outbound_Port1234"
@MathieuBuisson
MathieuBuisson / terraform_azure_network_example_test.go.txt
Created September 29, 2019 12:45
End of output of running go test -v -run TestTerraformAzureNetworkExample -timeout 20m
TestTerraformAzureNetworkExample 2019-09-28T21:51:42+01:00 command.go:158: azurerm_resource_group.example: Refreshing state... (ID: /subscriptions/53e77d8e-c18b-4040-846b-...9a/resourceGroups/terratest-example-rg)
TestTerraformAzureNetworkExample 2019-09-28T21:51:42+01:00 command.go:158: azurerm_network_security_group.nsg1: Refreshing state... (ID: /subscriptions/53e77d8e-c18b-4040-846b-...work/networkSecurityGroups/subnet1-nsg)
TestTerraformAzureNetworkExample 2019-09-28T21:51:42+01:00 command.go:158: azurerm_virtual_network.example: Refreshing state... (ID: /subscriptions/53e77d8e-c18b-4040-846b-...Network/virtualNetworks/terratest-vnet)
TestTerraformAzureNetworkExample 2019-09-28T21:51:42+01:00 command.go:158: azurerm_public_ip.example: Refreshing state... (ID: /subscriptions/53e77d8e-c18b-4040-846b-...publicIPAddresses/terratest-example-ip)
TestTerraformAzureNetworkExample 2019-09-28T21:51:42+01:00 command.go:158: azurerm_network_security_group.nsg2: Refreshing state... (ID: /subscriptions/53e77d8e-c18b-4
@MathieuBuisson
MathieuBuisson / Test-Conditional.ps1
Created August 17, 2017 13:31
Dummy function to test PowerShell code complexity measurement
Function Test-Conditional {
[CmdletBinding()]
Param(
[int]$IfElseif
)
# Testing nested If statement
If ( $IfElseif -gt 20 ) {
If ( $IfElseif -gt 40 ) {
Write-Host 'IfElseif is between 20 and 40'
@MathieuBuisson
MathieuBuisson / ReportWebUI.Tests.ps1
Created July 6, 2017 16:23
Selenium Tests for HTML Report
$ReportFilePath = 'C:\GitHub\PSCodeHealth\Examples\HtmlReport.html'
$ReportFileUrl = 'file:///{0}' -f $ReportFilePath.Replace('\','/')
Add-Type -Path 'C:\tools\selenium\lib\net40\WebDriver.dll'
$Driver = New-Object OpenQA.Selenium.Chrome.ChromeDriver
$Driver.Manage().Window.Maximize()
$Driver.Navigate().GoToUrl($ReportFileUrl)
Describe 'HTML Report UI tests' {
@MathieuBuisson
MathieuBuisson / Get-MemberFromTypeName.psm1
Last active September 2, 2016 09:55
Getting the members of a type, without an instance of the type
Function Get-MemberFromTypeName
{
[CmdletBinding()]
Param
(
# Name of the type from which you want the members
[Parameter(Mandatory=$True)]
[string]$TypeName
)