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
#requires -Module Az.Accounts | |
$verbosePreference = 'continue' | |
function ConvertFrom-JWTtoken { | |
<# | |
.NOTES | |
Lovingly borrowed from: https://www.michev.info/blog/post/2140/decode-jwt-access-and-id-tokens-via-powershell | |
#> | |
[cmdletbinding()] | |
param([Parameter(Mandatory = $true)][string]$token) | |
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
config router static | |
edit 1 | |
set gateway 10.0.0.1 | |
set device port1 | |
next | |
edit 2 | |
set dst 10.0.0.0/24 | |
set gateway 10.0.0.65 | |
set device port2 | |
next |
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": "Deny Service Endpoints on subnets", | |
"description": "This Policy will deny the enablement of Service Endpoints on subnets. This will also prevent PaaS resources such as Azure Storage from being able to add this subnet to their firewall allowed list.", | |
"mode": "All", | |
"policyRule": { | |
"if": { | |
"anyOf": [ | |
{ | |
"allOf": [ | |
{ |
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
trigger: | |
- none | |
variables: | |
- name: PROJECT_PATH | |
value: terraform | |
- name: tfComponent | |
value: cluster | |
- name: tfExecutionDir | |
value: '$(PROJECT_PATH)/src/$(tfComponent)' |
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
# Prerequisite: https://gist.github.com/adrienbrault/b76631c56c736def9bc1bc2167b5d129 | |
export MODEL=llama-2-13b-chat.ggmlv3.q4_0.bin | |
# Check if command line argument is given | |
if [ $# -eq 0 ]; then | |
echo "Prompt: " && | |
read PROMPT | |
else | |
PROMPT=$1 |
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 sbNamespaceName string = 'sbnamespace' | |
param topics array = [ | |
{ | |
name: 'topic1' | |
subscriptions: [ | |
'sub1.1' | |
'sub1.2' | |
] | |
} | |
{ |
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
while ($true) { | |
$freeslotData = Invoke-WebRequest -Uri "https://impfzentrum.termin-direkt.de/rest-v2/api/Calendars/8/FirstFreeSlot" -Headers @{ | |
"method" = "GET" | |
"authority" = "impfzentrum.termin-direkt.de" | |
"scheme" = "https" | |
"path" = "/rest-v2/api/Calendars/8/FirstFreeSlot" | |
"sec-ch-ua" = "`" Not;A Brand`";v=`"99`", `"Google Chrome`";v=`"91`", `"Chromium`";v=`"91`"" | |
"dnt" = "1" | |
"sec-ch-ua-mobile" = "?0" | |
"user-agent" = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.101 Safari/537.36" |
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 location string = resourceGroup().location | |
param environment string = 'dev' | |
param appName string = 'myapp' | |
var storageAccountName = 'st${appName}${environment}' | |
resource MyStorageAccount 'Microsoft.Storage/storageAccounts@2019-06-01' = { | |
name: storageAccountName | |
location: location | |
kind: 'Storage' | |
sku: { |
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
# Source: https://robertsmit.wordpress.com/2020/05/27/update-all-az-azure-powershell-modules-powershell-azure-script-modules/ | |
# Author: Robert Smit | |
Get-Module -Name az.* -ListAvailable | | |
Where-Object -Property Name -ne 'Az.' | | |
ForEach-Object { | |
$currentVersion = [Version] $_.Version | |
$newVersion = [Version] (Find-Module -Name $_.Name).Version | |
if ($newVersion -gt $currentVersion) { | |
Write-Host -Object "Updating $_ Module from $currentVersion to $newVersion" | |
Update-Module -Name $_.Name -RequiredVersion $newVersion -Force |
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
function GetWebSizes ($StartWeb) | |
{ | |
$web = Get-SPWeb $StartWeb | |
[long]$total = 0 | |
$total += GetWebSize -Web $web | |
$total += GetSubWebSizes -Web $web | |
$totalInMb = ($total/1024)/1024 | |
$totalInMb = "{0:N2}" -f $totalInMb | |
$totalInGb = (($total/1024)/1024)/1024 | |
$totalInGb = "{0:N2}" -f $totalInGb |
NewerOlder