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 downloading pictures | |
# first, export gedcom | |
$urls = gc ".....ged" | ? { $_ -match "2 FILE " } | % { $_.Replace("2 FILE ", "") } | |
$urls | % { Start-BitsTransfer $_ } | |
#open in code and replace and strip https parts leaving only filenames by using this regex: | |
# https:\/\/.*[^\/]\/ |
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
# emilie pixel art created | |
# using https://minecraftart.netlify.app/editor | |
# some blocks needed to be renamed | |
# saved in a datapack | |
# %appdata%/.minecraft/saves/pixelart002/datapacks/tolle/data/custom/functions/emilie003.mcfunction | |
# create even %appdata%/.minecraft/saves/pixelart002/datapacks/tolle/pack.mcmeta w content: | |
# {"pack":{"pack_format": 7,"description": "<Description>"}} | |
fill ~ ~ ~-1 ~ ~1 ~-1 minecraft:gray_concrete | |
fill ~ ~ ~-2 ~ ~ ~-3 minecraft:clay | |
fill ~ ~ ~-4 ~ ~1 ~-4 minecraft:gray_concrete |
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
#trying out https://www.svenmalvik.com/azure-apim-with-eventhub/ | |
# start azure cloud shell powershell | |
New-AzResourceGroup -Name "apim101-rg" -Location "West Europe" | |
New-AzApiManagement -ResourceGroupName "apim101-rg" -Name "svenmalvik-apim" -Sku "Consumption" -Capacity 0 -Location "West Europe" -Organization "chuvash.eu" -AdminEmail "[email protected]" | |
# The context tells us what instance of APIM we're working with | |
$apimCtx = New-AzApiManagementContext -ResourceGroupName "apim101-rg" -ServiceName "svenmalvik-apim" | |
# Add Conference API to the APIM instance | |
Import-AzApiManagementApi -Context $apimCtx -SpecificationFormat "Swagger" -SpecificationUrl "https://conferenceapi.azurewebsites.net?format=json" -Path "conf" -ApiId "confapi" |
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
$auth = "apitest:j2vsnu3obx55ekwjkfdxfpljziiy27qkuku5jitsx73wvegpdpeq" | |
$bytes = [System.Text.Encoding]::ASCII.GetBytes($auth) | |
$token = [System.Convert]::ToBase64String($bytes) | |
$headers = @{ Authorization = "Basic $token" } |
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
code --list-extensions | |
code --install-extension esbenp.prettier-vscode |
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
# I use SPO Admin a lot, change it to your desired role | |
$roleToActivate = "SharePoint Administrator" | |
# default 2 hours, update it to your needs | |
$hours = 2 | |
$reason = Read-Host "Justify your elevation" | |
$connection = Connect-AzureAD | |
$account = $connection.Account | |
$tenantId = $connection.TenantId | |
$user = Get-AzureADUser -SearchString $account | |
$objectId = $user.ObjectId |
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
$pnpModule = Get-Module PnP.PowerShell -ListAvailable | Sort-Object Version -Descending | Select-Object -First 1 |
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 creates organization assets libraries, organization wide and local ones (country specific) | |
# https://docs.microsoft.com/en-us/sharepoint/organization-assets-library | |
Connect-SPOService https://takana17-admin.sharepoint.com | |
# Check the status first | |
Get-SPOOrgAssetsLibrary | |
Get-SPOTenantCdnEnabled -CdnType Private | |
Get-SPOTenantCdnOrigins -CdnType Private | |
# Create a site that will host organization assets |
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
# it calculates storage capacity in SharePoint Online | |
# read more on my blog post: https://chuvash.eu/?p=5360 | |
$sku = Get-MsolAccountSku | |
$sku2 = $sku | % { | |
$s = $_; | |
$sr = [PSCustomObject]@{ | |
SkuPartNumber = $s.SkuPartNumber; | |
Licenses = $s.ActiveUnits + $s.WarningUnits | |
Services = $s.ServiceStatus | % { $_.ServicePlan.ServiceName }; | |
}; |
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 config --global user.email "[email protected]" | |
git config --global user.name "Azure DevOps" | |
REPO="$(System.TeamFoundationCollectionUri)$(System.TeamProject)/_git/$(Build.Repository.Name)" | |
EXTRAHEADER="Authorization: Bearer $(System.AccessToken)" | |
git -c http.extraheader="$EXTRAHEADER" clone $REPO | |
cd $(Build.Repository.Name) | |
MAINBRANCHNAME=$(git rev-parse --abbrev-ref HEAD) |