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
| function Install-ZabbixAgent { | |
| <# | |
| .SYNOPSIS | |
| Install Zabbix agent for Windows | |
| .DESCRIPTION | |
| Downloads Zabbix agent and installs it for Windows x64 OS | |
| .EXAMPLE | |
| Install-ZabbixAgent | |
| .PARAMETER ZabbixServerIPAddress | |
| Your Zabbix Server IP Address, defaults to allow all connections |
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
| git fetch --prune;git branch | where {$_ -notmatch 'master'} | %{git branch -D $_.trim()} |
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 boto3 | |
| from pprint import pprint | |
| ec2 = boto3.resource('ec2', 'eu-west-1') | |
| vms = ec2.instances.all() | |
| for vm in vms: | |
| o = { | |
| 'id': vm.id, | |
| 'state': vm.state['Name'], |
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
| provider "azurerm" { | |
| features {} | |
| } | |
| # https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/template_deployment | |
| variable "name" { | |
| default = "test" | |
| } |
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
| function New-AzureAccount { | |
| [CmdletBinding()] | |
| param ( | |
| [Parameter(Mandatory)] | |
| [string]$ClientId, | |
| [Parameter(Mandatory)] | |
| [string]$ClientSecret, | |
| [Parameter(Mandatory)] |
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
| [ | |
| { | |
| "name": "eastus", | |
| "regionalDisplayName": "(US) East US" | |
| }, | |
| { | |
| "name": "eastus2", | |
| "regionalDisplayName": "(US) East US 2" | |
| }, | |
| { |
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
| from selenium import webdriver | |
| from time import sleep | |
| import json | |
| # download: https://chromedriver.storage.googleapis.com/90.0.4430.24/chromedriver_win32.zip | |
| # extract the content to C:\Program Files\Chromedriver so you have "C:\Program Files\Chromedriver\chromedriver.exe" | |
| # add C:\Program Files\Chromedriver to system environment variable paths | |
| # pip install selenium | |
| URL = "https://google.com" |
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
| variable "my_list" { | |
| default = [ | |
| { | |
| id = 1 | |
| name = "name1" | |
| }, | |
| { | |
| id = 2 | |
| name = "my_name" | |
| }, |
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
| $devOpsProjects = (az devops project list | ConvertFrom-Json).value | |
| foreach ($i in $devOpsProjects) { | |
| Write-Output "importing $($i.name)" | |
| $command = @" | |
| terraform import 'azuredevops_project.project[\"$($i.name)\"]' "$($i.id)" | |
| "@ | |
| Invoke-Expression $command | |
| } |
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
| BeforeDiscovery { | |
| $testCases = Get-ChildItem -Path (Join-Path $PSScriptRoot examples) -Directory | |
| } | |
| describe 'terraform-module-storage - <_.Name>' -ForEach $testCases { | |
| BeforeAll -ErrorAction Stop { | |
| $exampleName = $_ | |
| Push-Location $exampleName | |
| Write-Host "Test case: $($ExampleName.Name)" -Foreground Magenta |