Conditional validation patterns
Using spread
const formSchema = computed(() => {
let schema = {
name: yup.string().required().label("Name"),
email: yup.string(),
quantity:
PetaPoco SQL Date to C# DateOnly mapping
public class CustomMapper : ConventionMapper
{
private static readonly Type DateOnlyType = typeof(DateOnly);
private static readonly Type DateTimeType = typeof(DateTime);
public override
Azure Function gotchas
If using [FromBody] model binding, include using FromBodyAttribute = Microsoft.Azure.Functions.Worker.Http.FromBodyAttribute;
otherwise the model binding will return
Fixing the white on white cursor in Google Docs
From this post: https://issues.chromium.org/issues/40239916#comment98
Add the following registry key and value
[HKEY_LOCAL_MACHINE\
Remove jobs from Hangfire
TRUNCATE TABLE [HangFire].[AggregatedCounter]
TRUNCATE TABLE [HangFire].[Counter]
TRUNCATE TABLE [HangFire].[JobParameter]
TRUNCATE TABLE [HangFire].[JobQueue]
TRUNCATE TABLE [HangFire].[List]
Change Scratch files location in Rider and Webstorm
Help > Edit Custom Properties
idea.scratch.path/scratches=G:/Dropbox/Work/ScratchFiles/Rider
idea.scratch.path/scratches=G:/Dropbox/
Fix SQL DECLARE variable use in DataGrip
In 2025.1.3 you can't execute this script by default
DECLARE @id INT = 1;
SELECT * FROM Users
Using MirageJS to fake a .NET API
By default Mirage sends models using a different style than .NET API. It also sends the model's Id
Killing a Vite port
Run npx kill-port 8080 etc
Fixing Chrome "Failed to read the cssRules" errors
At some point Chrome got picky about using <link> tags to load fonts from external domains for CORS