Skip to content

Instantly share code, notes, and snippets.

View explorest's full-sized avatar

Mumtaz Ali Shah explorest

  • Pakistan
View GitHub Profile
using System.Runtime.CompilerServices;
Foo foo = new Foo(5,6,7,8);
// scenario (why we're here): the GetRef method doesn't compile :(
// you cannot conveniently use by-ref return from struct methods
// or properties, because "this" is has scoped-like semantics;
// ("scoped" can be paraphrazed as "this reference is not captured
// or returned", i.e. it doesn't risk exposing the reference later)
@davidfowl
davidfowl / .NET6Migration.md
Last active December 8, 2025 20:34
.NET 6 ASP.NET Core Migration
@davidfowl
davidfowl / MinimalAPIs.md
Last active September 25, 2025 20:44
Minimal APIs at a glance
@explorest
explorest / dotnetlayout.md
Created June 24, 2021 04:58 — forked from davidfowl/dotnetlayout.md
.NET project structure
$/
  artifacts/
  build/
  docs/
  lib/
  packages/
  samples/
  src/
 tests/
@luvuong-le
luvuong-le / markdown-syntax-basics.md
Created August 31, 2020 09:22
Markdown Basic Syntax Sheet

Headings

Heading 1

Heading 2

Heading 3

Heading 6
@explorest
explorest / git.migrate
Created May 9, 2020 21:16 — forked from niksumeiko/git.migrate
Moving git repository and all its branches, tags to a new remote repository keeping commits history
#!/bin/bash
# Sometimes you need to move your existing git repository
# to a new remote repository (/new remote origin).
# Here are a simple and quick steps that does exactly this.
#
# Let's assume we call "old repo" the repository you wish
# to move, and "new repo" the one you wish to move to.
#
### Step 1. Make sure you have a local copy of all "old repo"
### branches and tags.
@O-I
O-I / four_elements_simple_design.md
Last active October 24, 2024 21:12
The Four Elements of Simple Design

The Four Elements of Simple Design

  • Introduced by [Kent Beck][beck] in the 1990s.
  • Part of his software development methodology [Extreme Programming][extreme-programming].
  • His exact wording appears in the [White Book][white-book].

The rules can be stated as followed:

  1. Passes all tests
  2. Maximizes clarity
@davidfowl
davidfowl / dotnetlayout.md
Last active December 10, 2025 11:40
.NET project structure
$/
  artifacts/
  build/
  docs/
  lib/
  packages/
  samples/
  src/
 tests/
@c0ldlimit
c0ldlimit / git_newrepo
Created November 16, 2012 17:14
Git: Push a new or existing repo to Github
# Create a new repository on the command line
touch README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/c0ldlimit/vimcolors.git
git push -u origin master
# Push an existing repository from the command line
@ff6347
ff6347 / clone_remote_branch.md
Last active April 13, 2023 19:34
clone remote branch with git