This file contains 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 init |
This file contains 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: Get commit Id | |
run: | | |
echo "COMMIT_ID=$GITHUB_SHA" >> $GITHUB_ENV | |
- name: Set image id | |
run: | | |
echo "DOCKER_IMAGE_TAG=$DOCKER_REPOSITORY_NAME/$DOCKER_IMAGE_BASENAME:$COMMIT_ID" >> $GITHUB_ENV |
This file contains 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: Read predefined variable | |
env: | |
MY_COMMIT_ID : $GITHUB_SHA | |
run: | | |
echo "$MY_COMMIT_ID" |
This file contains 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
Install-Module -Name SqlServer -RequiredVersion 21.1.18256 |
This file contains 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 ( | |
[Parameter(Mandatory)] $ServerLoginName, | |
[Parameter(Mandatory)] $ServerLoginPass, | |
[Parameter(Mandatory)] $NewUserLoginName, | |
[Parameter(Mandatory)] $NewUserLoginPass, | |
[Parameter(Mandatory)] $ServerName, | |
[Parameter(Mandatory)] $TargetDbName | |
) | |
$MasterDbConnectionString = "Server=tcp:$($ServerName).database.windows.net,1433;Initial Catalog=master;Persist Security Info=False;User ID=$($ServerLoginName);Password=$($ServerLoginPass);MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;" |
This file contains 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
$props = @{ | |
Parameters = @( | |
@{Name="rootItem"; Title="Root Item"; editor="droptree"; Root="/sitecore/"}) | |
Title = "Choose Root Item" | |
Description = "" | |
Width = 400 | |
Height = 200 | |
ShowHints = $true | |
} | |
This file contains 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
$item = Get-Item master:/content/home | |
$newTemplate = [Sitecore.Configuration.Factory]::GetDatabase("master").Templates["Sample/Sample Item"]; | |
$item.ChangeTemplate($newTemplate) |
This file contains 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
def is_prime(number): | |
for i in range(2,number-1): | |
if number % i == 0: | |
return False | |
return True | |
user_number = int(input("Pick a number and I'll tell t-ya if it's a prime :")) | |
if is_prime(user_number): | |
print("That's it you got a prime, optimus?") | |
else: |
This file contains 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 random | |
list_one = random.sample(range(100),20) | |
list_two = random.sample(range(100),20) | |
list_intersection=[a for a in list_one if a in list_two] | |
print(list_intersection) |