Skip to content

Instantly share code, notes, and snippets.

View vnbaaij's full-sized avatar

Vincent Baaij vnbaaij

View GitHub Profile
@vnbaaij
vnbaaij / 2.1_project_settings.csproj
Last active February 16, 2023 10:19
This is the (annotated) PropertyGroup as it is being used in the Fluent UI Web Components for Blazor demo environment. This configuration results in publishing 'all icons **EXCEPT** size 32' and 'all color emoji **EXCEPT** People & Body group' as static assets.
<PropertyGroup>
<!--
The icon component is part of the library. By default, NO icons (static assets) will be included when publishing the project.
Setting the property 'PublishFluentIconAssets' to false (default), or leaving the property out completely, will disable publishing of the
icon static assets (with exception of the icons that are being used by the library itself).
Setting the property 'PublishFluentIconAssets' to 'true' will enable publishing of the icon static assets. You can limit what icon assets
get published by specifying icon sizes and variants in the 'FluentIconSizes' and 'FluentIconVariants' properties respectively.
@vnbaaij
vnbaaij / NewFluentDataGrid.razor
Created November 30, 2022 20:55
New grid definition
<FluentDataGrid RowsData="@people">
<PropertyColumn Property="@(p => p.PersonId)" Sortable="true" />
<PropertyColumn Property="@(p => p.Name)" Sortable="true" />
<PropertyColumn Property="@(p => p.BirthDate)" Format="yyyy-MM-dd" Sortable="true" />
<FluentDataGrid>
@code {
record Person(int PersonId, string Name, DateOnly BirthDate);
IQueryable<Person> people = new[]
@vnbaaij
vnbaaij / OldFluentDataGRid.razor
Created November 30, 2022 20:51
Old grid definition
<FluentDataGrid id="defaultGrid" RowsData=RowsGrid ColumnDefinitions=ColumnsGrid GridTemplateColumns="1fr 1fr" /> @code {
record Person(int PersonId, string Name, DateOnly BirthDate);
public List<ColumnDefinition<Person>> ColumnsGrid = new();
IQueryable<Person> people = new[]
{
new Person(10895, "Jean Martin", new DateOnly(1985, 3, 16)),
new Person(10944, "António Langa", new DateOnly(1991, 12, 1)),
new Person(11203, "Julie Smith", new DateOnly(1958, 10, 10)),
<h2>Selected dates</h2>
<p>
<FluentCalendar DisabledDates=@disabledDates @bind-SelectedDates =@selectedDates></FluentCalendar>
</p>
<p>Dates Selected:</p>
<ul>
@foreach(DateOnly date in selectedDates)
{
<li>@date.ToString("yyyy-MM-dd")</li>
}
<FluentTreeView OnExpandedChange="HandleOnExpandedChanged">
<FluentTreeItem Text="Root item 1">
<FluentTreeItem Text="Flowers">
<FluentTreeItem Disabled="true" Text="Daisy" />
<FluentTreeItem Text="Sunflower" />
<FluentTreeItem Text="Rose" />
</FluentTreeItem>
<FluentTreeItem Text="Nested item 2" />
<FluentTreeItem Text="Nested item 3" />
</FluentTreeItem>
@page "/choiceGroupPage"
@using System.Collections.Generic
<header class="root">
<h1 class="title">ChoiceGroup</h1>
</header>
<div class="section" style="transition-delay: 0s;">
@vnbaaij
vnbaaij / gist:fde7488d09d086ee895ff473b46b6e1a
Created July 23, 2019 17:46
PowerShell script to collect usage limits and quota information from Azure subscription
Param(
[string]$workspaceId,
[string]$sharedKey,
[string[]]$locations
)
$connectionName = "AzureRunAsConnection"
try
{
# Get the connection "AzureRunAsConnection "
<!-- IIS URL Rewrite, this can be placed in the web.config -->
<!-- Handle Missing Media on Development Environment -->
<rule name="Handle missing media" stopProcessing="true">
<match url="^media/(.*)" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
<!-- Add Conditions, so local only -->
</conditions>