Skip to content

Instantly share code, notes, and snippets.

warappa / App.xaml
Last active October 31, 2022 15:24
Overriding Styles in Xaml
<Application x:Class="WpfApp1.App"
<!-- base colors -->
<SolidColorBrush x:Key="buttonBackground" Color="#ff00ff"></SolidColorBrush>
<!-- base button style -->
warappa / FoldToAscii.cs
Last active December 12, 2021 13:40
Ignore diacritics in Like using a custom SQLite function
public static class StringExtensions
/// <summary>
/// Converts characters above ASCII to their ASCII equivalents. For example,
/// accents are removed from accented characters.
/// </summary>
/// <param name="input"> The string of characters to fold </param>
/// <param name="length"> The length of the folded return string </param>
/// <returns> length of output </returns>
public static string FoldToASCII(this string input, int? length = null)
warappa / AppDbContext.cs
Last active June 17, 2019 15:32
Using global value converters with Entity Framework Core 2.2.5. Based on Andrew Lock's StronglyTypedIdValueConverterSelector
using Microsoft.EntityFrameworkCore;
namespace GlobalValueConverterSample
public class AppDbContext : DbContext
public AppDbContext(DbContextOptions<AppDbContext> options)
: base(options)
warappa / Bootstrap.cs
Last active December 22, 2015 00:19
A possible way of doing event-versioning with NEventStore and a custom Json.Net NEventStore-serializer.
public class EventStorageBootStrap
public static void BootStrap()
var eventStore = Wireup.Init()
.UsingNewtonsoftJsonSerialization(new VersionedEventSerializationBinder())