Skip to content

Instantly share code, notes, and snippets.

@maxfridbe
maxfridbe / ShouldSerializeContractResolver.cs
Created January 15, 2020 20:48
will serialize only not null or empty lists
public class ShouldSerializeContractResolver : DefaultContractResolver
{
public static readonly ShouldSerializeContractResolver Instance = new ShouldSerializeContractResolver();
protected override JsonProperty CreateProperty(MemberInfo member, MemberSerialization memberSerialization)
{
JsonProperty property = base.CreateProperty(member, memberSerialization);
if (property.PropertyType == typeof(string))
return property;
@maxfridbe
maxfridbe / del_smaller_than.ps1
Created May 14, 2020 16:36
..fucking powershell
$id = get-random
$maxSizeMB = 500
$code = @"
using System;
using System.IO;
using System.Linq;
using System.Collections.Generic;
namespace HelloWorld
@maxfridbe
maxfridbe / config.toml
Created June 19, 2024 19:25
windows like config for helix
[editor]
true-color = true
color-modes = true
[keys.insert]
C-s = ["normal_mode", ":w", "insert_mode"]
C-q = ":quit!"
C-S-up = "extend_line_up"
S-up = ["extend_line_up"]
C-S-down = ["extend_line_down"]