Jeff Sodeman

Conditional validation patterns

Using spread const formSchema = computed(() => { let schema = { name: yup.string().required().label("Name"), email: yup.string(), quantity: yup.number().required().moreThan(0).lessThan(11).label("Quantity"), productId: yup.number().required().label("Product"), shipMethod: yup.string().required().label("Shipping Method"), }; // example of

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 Func<object, object> GetFromDbConverter(PropertyInfo targetProperty, Type sourceType) { // see if there's already a converter on the class/property var result = base.GetFromDbConverter(targetProperty, sourceType); if (result

Azure Function gotchas

If using [FromBody] model binding, include using FromBodyAttribute = Microsoft.Azure.Functions.Worker.Http.FromBodyAttribute; otherwise the model binding will return null

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\SOFTWARE\Microsoft\Windows\Dwm] "OverlayTestMode"=dword:00000005

Remove jobs from Hangfire

TRUNCATE TABLE [HangFire].[AggregatedCounter] TRUNCATE TABLE [HangFire].[Counter] TRUNCATE TABLE [HangFire].[JobParameter] TRUNCATE TABLE [HangFire].[JobQueue] TRUNCATE TABLE [HangFire].[List] TRUNCATE TABLE [HangFire].[State] DELETE FROM [HangFire].[Job] DBCC CHECKIDENT ('[HangFire].[Job]', reseed, 0) UPDATE [HangFire].[Hash] SET Value = 1 WHERE Field = 'LastJobId'

Jeff Sodeman © 2026