Skip to content

Instantly share code, notes, and snippets.

View peteraritchie's full-sized avatar

Peter Ritchie peteraritchie

View GitHub Profile

The structure of IPv4 addresses lies at the core of the internet's architecture

  • does calling out IPv4 mean many of the details in this chapter apply to IPv6?

The very structure of IPv4 addresses presents an interesting duality: they serve as both identifiers and locators.

  • "Locator" in what sense?

[Just as a street address indicates a specific location, an IP address designates a particular device on a network. The subnet mask, analogous to the zip code, guides data packets to their intended destination.](

HTML Entities


HTML Description HTML Description HTML Description
℅ care of ℞ prescription ⌖ target
⁃ hypen bullet ⦾ circled white bullet ⦿ ⦿ circled bullet
  very thin space ​ zero-width space


peteraritchie /
Last active February 27, 2024 20:11
A file that cleans the `obj` and `bin` directories when executing `dotnet clean` or the clean operation in Visual Studio. Find latest version here:
<!-- See for more details on customizing your build -->
<Target Name="PostClean" AfterTargets="Clean">
<RemoveDir Directories="$(BaseIntermediateOutputPath)" />
<RemoveDir Directories="$(BaseOutputPath)" />
peteraritchie / visual-studio-classes.ps1
Created February 27, 2024 16:02
A work in progress for a couple (maybe more) classes to wrap some `dotnet new` commands.
<# e.g.:
. .\visual-studio-classes.ps1
$csproj = [Project]::CreateClassLib(".\Solution\ClassLib\ClassLib.csproj");
class Project {
Project() {

Visual Studio HTTP Files


  "dev": {
    "ClientSecret": {
      "provider": "AzureKeyVault",
      "secretName": "clientSecret",
peteraritchie /
Created December 12, 2023 22:34
Search and replace try/catch in C#

Search for


Replace with:


dotnet new sln -n MySolution
gci -r '*.csproj' | ForEach-Object { dotnet sln MySolution.sln add $_.FullName;}

Akin's Laws Spacecraft Design

From Akin's Laws of Spacecraft Design

  1. Engineering is done with numbers. Analysis without numbers is only an opinion.

  2. To design a spacecraft right takes an infinite amount of effort. This is why it's a good idea to design them to operate when some things are wrong .

  3. Design is an iterative process. The necessary number of iterations is one more than the number you have currently done. This is true at any point in time.

RFC 1924