Skip to content

Instantly share code, notes, and snippets.

View dariusz-wozniak's full-sized avatar
🏀

Dariusz Woźniak dariusz-wozniak

🏀
View GitHub Profile
^\d{4}\-(0?[1-9]|1[012])\-(0?[1-9]|[12][0-9]|3[01])$
New-Guid | scb
[guid]::newguid().ToString() | Set-ClipboardText
az account list --all --output table
  • ×
  • §
@dariusz-wozniak
dariusz-wozniak / ShouldAsync.cs
Last active April 5, 2022 10:33
FluentAssertions - Should async
Func<Task> act = async () => await sut.DoSth(null!);
await act.Should().ThrowExactlyAsync<ArgumentNullException>();
@dariusz-wozniak
dariusz-wozniak / Startup.cs
Created August 2, 2019 09:31 — forked from regisdiogo/Startup.cs
ASP.NET Core - Json serializer settings Enum as string and ignore null values
public class Startup
{
public IServiceProvider ConfigureServices(IServiceCollection services)
{
services.AddMvc().AddJsonOptions(options =>
{
options.SerializerSettings.Converters.Add(new Newtonsoft.Json.Converters.StringEnumConverter());
options.SerializerSettings.NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore;
});
}
@dariusz-wozniak
dariusz-wozniak / new-guid.ps1
Last active January 30, 2020 12:32
Create a new GUID and copy to clipboard with no newlines
[guid]::newguid().ToString() | scb
@dariusz-wozniak
dariusz-wozniak / README.md
Created June 14, 2019 13:34
Official BitBucket README.md

README

This README would normally document whatever steps are necessary to get your application up and running.

What is this repository for?

@dariusz-wozniak
dariusz-wozniak / greplike-format.ps1
Last active January 29, 2019 18:56
PowerShell grep-like
Get-ChildItem *.md -Recurse | sls "path" | Format-table