Skip to content

Instantly share code, notes, and snippets.

@cajuncoding
cajuncoding / SystemTextJsonNodeMergeExtensions.cs
Last active April 18, 2025 10:27
Simple Merge process for JsonNode using System.Text.Json
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using System.Text.Json.Nodes;
namespace CajunCoding
{
public static class SystemTextJsonMergeExtensions
{
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@StephenCleary
StephenCleary / Moved.md
Last active March 30, 2023 01:20
TaskGroup: Structured Concurrency for C#
@davidfowl
davidfowl / .NET6Migration.md
Last active April 11, 2025 11:12
.NET 6 ASP.NET Core Migration
@richlander
richlander / modernizing-csharp9.md
Last active April 26, 2024 17:14
Modernizing a codebase for C# 9

Modernizing a codebase for C# 9

There are lots of cases that you can improve. The examples use nullable reference types, but only the WhenNotNull example requires it.

Use the property pattern to replace IsNullorEmpty

Consider adopting the new property pattern, wherever you use IsNullOrEmpty.

string? hello = "hello world";
using System.Collections.Generic;
using System.Linq;
namespace System.Collections.Immutable
{
public class ImmutableListWithValueSemantics<T> : IImmutableList<T>, IEquatable<IImmutableList<T>>
{
IImmutableList<T> _list;
public ImmutableListWithValueSemantics(IImmutableList<T> list) => _list = list;
@onlurking
onlurking / programming-as-theory-building.md
Last active April 30, 2025 13:58
Programming as Theory Building - Peter Naur

Programming as Theory Building

Peter Naur

Peter Naur's classic 1985 essay "Programming as Theory Building" argues that a program is not its source code. A program is a shared mental construct (he uses the word theory) that lives in the minds of the people who work on it. If you lose the people, you lose the program. The code is merely a written representation of the program, and it's lossy, so you can't reconstruct

@simonbondo
simonbondo / convert-svn2git.ps1
Created November 26, 2019 09:40
Converts a collection of projects from a SVN mono-repo to separate git repos.
# Where svn.exe can be found
$svnPath = 'C:\Data\svn'
# Where the resulting git repositories should be created
$gitRepoPath = 'C:\Data\svn\git'
# The branch that should become the default branch in the git repository
$defaultBranch = 'trunk'
$removeTempRepository = $true
# The URL to the SVN server (can be file:///)
$svnRepoUrl = 'file:///c:\Data\svn\SVNRepo'
# The relative paths of each project inside the SVN repository, where 'trunk', 'branches' and 'tags' folders can be found
@ZapDos7
ZapDos7 / 00_git_intro.md
Last active April 29, 2025 11:11
Git Notes

Git

@shawty
shawty / rpi_install_instructions.txt
Last active March 17, 2021 23:32
Instructions on how to get the latest dotnet core 3 (as of 24th April 2019) and Blazor running on a Raspberry PI
*******************************************************************************************************
** PLEASE NOTE THAT THIS IS NOW SOMEWHAT OUT OF DATE, THE GENERAL APT-GET LINUX INSTALL INSTRUCTIONS **
** FOR UBUNTU/DEBIAN NOW LARGLEY WORK ON RASBIAN **
*******************************************************************************************************
First things first, make sure your Raspberry PI has the latest updates for Raspbian on by running
sudo apt-get -y update
sudo apt-get -y upgrade