Skip to content

Instantly share code, notes, and snippets.

View stamminator's full-sized avatar
:shipit:

Jacob Stamm stamminator

:shipit:
View GitHub Profile
@stamminator
stamminator / WinSetView-Custom.ini
Last active September 4, 2024 17:24
Windows 11 clean install guide
[Options]
ThemeIndex=3
Language=en-US
Font1=Consolas
Font2=Consolas
Size1=11
Size2=10
Scroll=1
Interface=2
Reset=0
@stamminator
stamminator / README.md
Last active August 1, 2024 18:04
Oh My Posh theme (jelly)

Custom theme for Oh My Posh. Had to call it something, so I went with "jelly".

jelly-theme-ohmyposh

The red 🛡️ appears when in an elevated prompt (administrator or root).

File paths are not truncated, which allows for easy copy/pasting.

@stamminator
stamminator / README.md
Last active February 4, 2022 17:14
Using System.Text.Json serialization in ASP.NET MVC 5

This gist shows the various pieces needed to implement System.Text.Json instead of System.Web.Script.Serialization.JavaScriptSerializer or Newsonsoft.Json in ASP.NET MVC 5. We need to make the replacement in two places: the model binding for deserializing requests, and JsonResult for serializing responses.

For the model binding, implement a custom Value Provider to replace the default JsonValueProviderFactory.

CustomJsonValueProviderFactory.cs

using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;