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
// There are 2 types of tickets, blue tickets for regular attendees and golden tickets for VIP access | |
// Requirements | |
// People should enter the movie in the order they arrived | |
// Golden ticket holders should enter first | |
// Both blue ticket and golden tickets holders can enter any time before minute 30 of the movie | |
// No one should enter before 1 hour prior to movie start | |
open System | |
type Ticket = | |
| Golden |
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
resource monitoringContributorAssignment 'Microsoft.Authorization/roleAssignments@2020-04-01-preview' = { | |
name: guid(subscription().id, 'st-logs-to-law', '749f88d5-cbae-40b8-bcfc-e573ddc772fa') | |
properties: { | |
roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '749f88d5-cbae-40b8-bcfc-e573ddc772fa') | |
principalType: 'ServicePrincipal' | |
principalId: initiativeDefinitionPolicyAssignment.identity.principalId | |
} | |
} | |
resource logAnalyticsContributorAssignment 'Microsoft.Authorization/roleAssignments@2020-04-01-preview' = { |
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
@description('Policy Definition Resource ID to create remediation task for.') | |
param remediatePolicyId string | |
@description('The Policy Definitions that were applied') | |
param policyDefinitions array | |
@description('The Policy Assignment ID') | |
param policyAssignmentId string | |
resource remediateTask 'Microsoft.PolicyInsights/remediations@2021-10-01' = [for definition in policyDefinitions: if (remediatePolicyId == definition.policyDefinitionId) { | |
name: guid('Remediate', definition.policyDefinitionReferenceId, subscription().id) | |
properties: { |
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
// get the log analytics workspace for the policy | |
resource logAnalyticsWorkspace 'Microsoft.OperationalInsights/workspaces@2021-06-01' existing = {...} | |
resource policyDefinition 'Microsoft.Authorization/policySetDefinitions@2020-09-01' = { | |
name: 'Test Azure Policy' | |
properties: { | |
... | |
parameters: { | |
logAnalyticsWorkspace: { | |
type: 'String' |
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
bin/ | |
obj/ |
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
#r "nuget: FSharp.Data" | |
open System.IO | |
open System.Text.RegularExpressions | |
open FSharp.Data | |
let currentDirectory = System.Environment.CurrentDirectory | |
let readmeLocation = Path.Join(currentDirectory, "README.asciidoc") | |
let replaceTextInGroup (currentText: string) replaceText (group: Group) = | |
currentText.Replace(group.Value, $"{System.Environment.NewLine}{replaceText}{System.Environment.NewLine}") |
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: Untappd README Update | |
on: | |
schedule: | |
- cron: '0 */1 * * *' | |
workflow_dispatch: | |
jobs: | |
get_activities: | |
name: Get the latest activity feed |
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
module Isogram | |
let isIsogram str = | |
let cleanString (word: string) = word.ToLower().Replace("-", "").Replace(" ", "") | |
let getCharCount word = word |> Seq.toList |> Seq.countBy(id) | |
let hasDuplicates charCounts = not (Seq.exists (fun (_, v) -> v > 1) charCounts) | |
str |> (cleanString >> getCharCount >> hasDuplicates) |
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
<Project Sdk="Microsoft.NET.Sdk.Web"> | |
<PropertyGroup> | |
<TargetFramework>net5.0</TargetFramework> | |
<RuntimeIdentifier>browser-wasm</RuntimeIdentifier> | |
<UseBlazorWebAssembly>true</UseBlazorWebAssembly> | |
</PropertyGroup> | |
<ItemGroup> | |
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="5.0.0-rc.1.20405.9" /> |
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
<Project Sdk="Microsoft.NET.Sdk.Web"> | |
<PropertyGroup> | |
<TargetFramework>net5.0</TargetFramework> | |
<RuntimeIdentifier>browser-wasm</RuntimeIdentifier> | |
<UseBlazorWebAssembly>true</UseBlazorWebAssembly> | |
</PropertyGroup> | |
<ItemGroup> | |
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="5.0.0-rc.1.20405.9" /> |
NewerOlder