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 | |
param containersRGMI string | |
@description('Create a brand new User Assigned Managed Identity') | |
resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = { | |
name: containersRGMI | |
location: location | |
} |
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
[FunctionName("O_PeriodicTask3")] | |
public static async Task<string> PeriodicTask3([OrchestrationTrigger] IDurableOrchestrationContext context, ILogger log) | |
{ | |
var waitBetweenTries = TimeSpan.FromSeconds(100); // 3 tries in 5 minutes | |
var phoneNumbers = await context.CallActivityAsync<string[]>("A_GetNumbersFromStorage", null); | |
var callTime = context.CurrentUtcDateTime; | |
try | |
{ | |
foreach (var phoneNumber in phoneNumbers) |
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
[FunctionName("O_PeriodicTask")] | |
public static async Task<int> PeriodicTask([OrchestrationTrigger] IDurableOrchestrationContext ctx, ILogger log) | |
{ | |
var timesRun = ctx.GetInput<int>(); | |
timesRun++; | |
if (!ctx.IsReplaying) | |
log.LogWarning($"Starting the PeriodicTask activity {ctx.InstanceId}, {timesRun}"); | |
await ctx.CallActivityAsync("A_PeriodicActivity", timesRun); | |
var nextRun = ctx.CurrentUtcDateTime.AddSeconds(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
[FunctionName("A_MakeCall2")] | |
public static string MakeCall2([ActivityTrigger] CallInfo callInfo, [Table("MadeCalls2", "AzureWebJobStorage")] out CallDetails calldetails, ILogger log) | |
{ | |
log.LogWarning($"MakeCall {callInfo.Numbers}"); | |
var madeCallId = Guid.NewGuid().ToString("N"); | |
calldetails = new CallDetails | |
{ | |
PartitionKey = "MadeCalls", |
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
CD $HOME | |
wget https://gist.githubusercontent.com/gsuttie/9fc7736ebf06371a601218902adee770/raw/9d007ccb7fc367bf26a3b3d6c71fa11b3b5ffa85/customRoleDefinition.json | |
$subscription_id = (Get-AzContext).Subscription.id | |
(Get-Content -Path $HOME/customRoleDefinition.json) -Replace 'SUBSCRIPTION_ID', $subscription_id | | |
Set-Content -Path $HOME/customRoleDefinition.json | |
New-AzRoleDefinition -InputFile ./customRoleDefinition.json |
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": "Virtual Machine Operator (Custom)", | |
"Id": null, | |
"IsCustom": true, | |
"Description": "Allows to start and stop (deallocate) Azure VMs", | |
"Actions": [ | |
"Microsoft.Compute/*/read", | |
"Microsoft.Compute/virtualMachines/deallocate/action", | |
"Microsoft.Compute/virtualMachines/start/action" | |
], |
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
# Python example Azure Pipeline | |
trigger: | |
- azure-pipelines | |
- master | |
jobs: | |
- job: Ubuntu_testing | |
# https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&tabs=schema#pool |
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
# PowerShell Systems Report | |
# Example usage: .\SystemsReport.ps1 .\list.txt | |
# Remember that list.txt is the file containing a list of Server names to run this against | |
#region Variables and Arguments | |
$users = "[email protected]" # List of users to email your report to (separate by comma) | |
$fromemail = "[email protected]" | |
$server = "yourmailserver.yourcompany.com" #enter your own SMTP server DNS name / IP address here | |
$list = $args[0] #This accepts the argument you add to your scheduled task for the list of servers. i.e. list.txt | |
$computers = get-content $list #grab the names of the servers/computers to check from the list.txt file. |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"> | |
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic' rel='stylesheet' type='text/css'> | |
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha256-3dkvEK0WLHRJ7/Csr0BZjAWxERc5WH7bdeUya2aXxdU= sha512-+L4yy6FRcDGbXJ9mPG8MT/3UCDzwR9gPeyFNMCtInsol++5m3bk2bXWKdZjvybmohrAsn3Ua5x8gfLnbE1YkOg==" crossorigin="anonymous"> |
NewerOlder