Skip to content

Instantly share code, notes, and snippets.

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, 2024 02:02
.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;
@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 March 9, 2024 12:08
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
@influentcoder
influentcoder / groups.md
Created March 13, 2019 13:36
Magma, Semigroups, Monoids, Groups

Summary

Closure Associativity Identity Invertibility
Magma Required
Semigroup Required Required
Monoid Required Required Required
Group Required Required Required Required

Magma

@richlander
richlander / Program.cs
Last active May 9, 2020 21:29
Environment information
using System;
using System.IO;
using System.Reflection;
using System.Runtime.InteropServices;
using static System.Console;
namespace versioninfo
{
class Program
{