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
package gitlab | |
import ( | |
"io/ioutil" | |
"log" | |
"net/http" | |
) | |
const ( | |
timeout = 30 |
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
ALTER USER user_name IDENTIFIED BY new_password; |
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
terraform { | |
required_providers { | |
aws = { | |
source = "hashicorp/aws" | |
version = "~> 3.0" | |
} | |
} | |
} | |
# Configure the AWS Provider |
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
$uname = 'USERNAME' | |
$passwd = 'PASSWORD' | |
$TowerApiUrl = 'https://<REPLACE_WITH_TOWER_URL>/api/v2' | |
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 | |
$Authorization = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes("$uname`:$passwd")) | |
$MeUri = $TowerApiUrl + '/me/' | |
$MeResult = Invoke-RestMethod -Uri $MeUri -Headers @{ "Authorization" = "Basic $Authorization" ; "Content-Type" = 'application/json'} -ErrorAction Stop |
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
<# | |
.SYNOPSIS | |
Delete default WAF settings. | |
.DESCRIPTION | |
This script deletes the default setting created when the WAF is deployed using building blocks. | |
.EXAMPLE | |
.\cleanWAF.ps1 -WAFName WAFTEST01 | |
#> | |
param( |
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
<# | |
.SYNOPSIS | |
Set IAM role assigments to specific resources. | |
.DESCRIPTION | |
The scripts gets the identity object id from the resource group so you need to ne added it before | |
.EXAMPLE | |
.\roleAssigment.ps1 -SubscriptionName CTSBP-PROD-SUB -ResourceGroupName UWUPIERSG01 -IdentityList IT-Team,CT-USER -ResourceList WEBAPPNAME01,STORAGEACC01 -RoleName Contributor | |
.\roleAssigment.ps1 -SubscriptionName CTSBP-TEST-SUB -ResourceGroupName UWUPIERSG01 -IdentityList CT-USER -ResourceList WEBAPPNAME01 -RoleName Reader | |
#> |
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-AzRoleAssignment -Scope $webAppId | where {$_.DisplayName -match "CTP-TaxtobinII-DEV" -or $_.DisplayName -match "IT-TAX_ASKTOBIN_MSP01-Team" } |
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
$subsNames = @(Get-AzSubscription | select name) | |
foreach ($name in $subsNames) { | |
if ($name -match "USWE") { | |
Get-AzSubscription -SubscriptionName $name | Set-AzContext | |
#Commands to run into subscription | |
Get-AzResourceGroup | |
} | |
} |
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 ($server, $u = "Student", $p = "Pa55w.rd1234") | |
echo "Connecting to $Server" | |
$User=$u | |
$Password=$p | |
cmdkey /generic:TERMSRV/$server /user:$User /pass:$Password | |
mstsc /v:$server |
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
for i in $buckets; do aws s3 rm --recursive s3://$i; done |
NewerOlder