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
{ | |
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", | |
"contentVersion": "1.0.0.0", | |
"parameters": { | |
"containerName": { | |
"type": "string" | |
}, | |
"dnsNameLabel": { | |
"type": "string" | |
}, |
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-Disk | Where-Object {$_.PartitionStyle -eq 'RAW'} | Initialize-Disk -PassThru | New-Partition -AssignDriveLetter -UseMaximumSize | Format-Volume |
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( | |
[string]$version, | |
$AllowRemoteExecution = $True | |
) | |
# install AV | |
$path = 'C:\av' | |
$fileName = 'output.txt' | |
$fullFilePath = (Join-Path -Path $path -ChildPath $fileName) | |
New-Item -ItemType Directory -Path $path | |
New-Item -ItemType File -Path $fullFilePath |
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
Resources: | |
MyInstance: | |
Type: 'AWS::EC2::Instance' | |
Properties: | |
AvailabilityZone: eu-west-1a | |
ImageId: | |
Ref: ImageId | |
KeyName: !Ref KeyName | |
InstanceType: | |
Ref: InstanceType |
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 main | |
import ( | |
"encoding/base64" | |
"fmt" | |
"math/rand" | |
"time" | |
"golang.org/x/crypto/bcrypt" | |
) |
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
''' | |
This script parses environment variables and gets set of three variables at the time. | |
It then calls function with those arguments (database, username, password) based on pattern: | |
DB_<UNIQUENAME>_DATABASE | |
DB_<UNIQUENAME>_USERNAME | |
DB_<UNIQUENAME>_PASSWORD | |
''' | |
import re |
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 crypt | |
def crypt_test(password, salt, checksum='my43charchecksum'): | |
'''Test only the logic without crypt library''' | |
correct = 'iCeCream9999' | |
if password == correct: | |
return 'prefix {} suffix'.format(checksum) | |
return 'prefix something else suffix' |
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
'''Dynamic templates''' | |
# -*- coding: utf-8 -*- | |
import os | |
import locale | |
from string import Template | |
class Car: | |
'''Class Car''' |
NewerOlder