Skip to content

Instantly share code, notes, and snippets.

@premun
Last active September 20, 2023 19:59
Show Gist options
  • Select an option

  • Save premun/c27b37d58beb9f49cce4026299019de8 to your computer and use it in GitHub Desktop.

Select an option

Save premun/c27b37d58beb9f49cce4026299019de8 to your computer and use it in GitHub Desktop.

Revisions

  1. premun revised this gist Sep 20, 2023. 1 changed file with 4 additions and 2 deletions.
    6 changes: 4 additions & 2 deletions VMR experiments.md
    Original file line number Diff line number Diff line change
    @@ -16,7 +16,8 @@
    `code Program.cs`
    You can put something like `Console.WriteLine(((string?)null)!.Length);`
    11. Run it
    `/workspaces/.dotnet/dotnet run`
    `/workspaces/.dotnet/dotnet run`
    🔥🔥🔥

    ## Using Docker

    @@ -35,4 +36,5 @@
    9. Change `Program.cs` to throw an NRE
    `echo 'Console.WriteLine(((string?)null)!.Length);' > Program.cs`
    10. Run it
    `$HOME/.dotnet/dotnet run`
    `$HOME/.dotnet/dotnet run`
    🔥🔥🔥
  2. premun revised this gist Sep 20, 2023. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions VMR experiments.md
    Original file line number Diff line number Diff line change
    @@ -23,11 +23,11 @@
    1. Run the container:
    `docker run --rm -itv vmr:/vmr -w /vmr mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-36`
    3. Clone the monorepo
    `git clone https://github.com/dotnet/dotnet`
    `git clone https://github.com/dotnet/dotnet .`
    3. Change the [`NullReferenceException.cs`](https://github.com/dotnet/dotnet/blob/main/src/runtime/src/libraries/System.Private.CoreLib/src/System/NullReferenceException.cs) file
    `vi /vmr/src/runtime/src/libraries/System.Private.CoreLib/src/System/NullReferenceException.cs`
    5. Build the .NET SDK
    `cd dotnet && ./prep.sh && ./build.sh --online --clean-while-building`
    `./prep.sh && ./build.sh --online --clean-while-building`
    5. Unpack the SDK
    `mkdir -p $HOME/.dotnet && tar -zxf artifacts/x64/Release/dotnet-sdk-* -C $HOME/.dotnet`
    8. Create a new project:
  3. premun revised this gist Sep 20, 2023. 1 changed file with 0 additions and 2 deletions.
    2 changes: 0 additions & 2 deletions VMR experiments.md
    Original file line number Diff line number Diff line change
    @@ -20,8 +20,6 @@

    ## Using Docker

    ⚠️ These are from memory and haven't been tried out. Will fix them as I go. ⚠️

    1. Run the container:
    `docker run --rm -itv vmr:/vmr -w /vmr mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-36`
    3. Clone the monorepo
  4. premun revised this gist Sep 20, 2023. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions VMR experiments.md
    Original file line number Diff line number Diff line change
    @@ -26,6 +26,8 @@
    `docker run --rm -itv vmr:/vmr -w /vmr mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-36`
    3. Clone the monorepo
    `git clone https://github.com/dotnet/dotnet`
    3. Change the [`NullReferenceException.cs`](https://github.com/dotnet/dotnet/blob/main/src/runtime/src/libraries/System.Private.CoreLib/src/System/NullReferenceException.cs) file
    `vi /vmr/src/runtime/src/libraries/System.Private.CoreLib/src/System/NullReferenceException.cs`
    5. Build the .NET SDK
    `cd dotnet && ./prep.sh && ./build.sh --online --clean-while-building`
    5. Unpack the SDK
  5. premun revised this gist Sep 20, 2023. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion VMR experiments.md
    Original file line number Diff line number Diff line change
    @@ -4,7 +4,8 @@

    1. Create a Codespace from https://github.com/dotnet/dotnet
    ![image](https://user-images.githubusercontent.com/7013027/269297137-4163abeb-444e-4121-958a-d2b0ec869823.png)
    3. Change the [`NullReferenceException.cs`](https://github.com/dotnet/dotnet/blob/main/src/runtime/src/libraries/System.Private.CoreLib/src/System/NullReferenceException.cs) file
    3. Change the [`NullReferenceException.cs`](https://github.com/dotnet/dotnet/blob/main/src/runtime/src/libraries/System.Private.CoreLib/src/System/NullReferenceException.cs) file
    `code /workspaces/dotnet/src/runtime/src/libraries/System.Private.CoreLib/src/System/NullReferenceException.cs`
    5. Build the .NET SDK (~45 minutes)
    `cd /workspaces/dotnet && ./prep.sh && ./build.sh --online`
    6. Unpack the SDK
  6. premun revised this gist Sep 20, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion VMR experiments.md
    Original file line number Diff line number Diff line change
    @@ -31,7 +31,7 @@
    `mkdir -p $HOME/.dotnet && tar -zxf artifacts/x64/Release/dotnet-sdk-* -C $HOME/.dotnet`
    8. Create a new project:
    `mkdir $HOME/foo && cd $HOME/foo && $HOME/.dotnet/dotnet new console`
    9. Change `Program.cs` to throw an NRE
    9. Change `Program.cs` to throw an NRE
    `echo 'Console.WriteLine(((string?)null)!.Length);' > Program.cs`
    10. Run it
    `$HOME/.dotnet/dotnet run`
  7. premun revised this gist Sep 20, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion VMR experiments.md
    Original file line number Diff line number Diff line change
    @@ -32,6 +32,6 @@
    8. Create a new project:
    `mkdir $HOME/foo && cd $HOME/foo && $HOME/.dotnet/dotnet new console`
    9. Change `Program.cs` to throw an NRE
    You can put something like `Console.WriteLine(((string?)null)!.Length);`
    `echo 'Console.WriteLine(((string?)null)!.Length);' > Program.cs`
    10. Run it
    `$HOME/.dotnet/dotnet run`
  8. premun revised this gist Sep 20, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion VMR experiments.md
    Original file line number Diff line number Diff line change
    @@ -24,7 +24,7 @@
    1. Run the container:
    `docker run --rm -itv vmr:/vmr -w /vmr mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-36`
    3. Clone the monorepo
    `git clone https://github.com/dotnet/dotnet .`
    `git clone https://github.com/dotnet/dotnet`
    5. Build the .NET SDK
    `cd dotnet && ./prep.sh && ./build.sh --online --clean-while-building`
    5. Unpack the SDK
  9. premun revised this gist Sep 20, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion VMR experiments.md
    Original file line number Diff line number Diff line change
    @@ -26,7 +26,7 @@
    3. Clone the monorepo
    `git clone https://github.com/dotnet/dotnet .`
    5. Build the .NET SDK
    `cd /vmr && ./prep.sh && ./build.sh --online --clean-while-building`
    `cd dotnet && ./prep.sh && ./build.sh --online --clean-while-building`
    5. Unpack the SDK
    `mkdir -p $HOME/.dotnet && tar -zxf artifacts/x64/Release/dotnet-sdk-* -C $HOME/.dotnet`
    8. Create a new project:
  10. premun revised this gist Sep 20, 2023. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions VMR experiments.md
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,8 @@
    Instructions for https://twitter.com/premun_/status/1626560566469791746
    ℹ️ Instructions for https://twitter.com/premun_/status/1626560566469791746

    ## Using Codespaces

    1. Create a Codespace at https://github.com/dotnet/dotnet
    1. Create a Codespace from https://github.com/dotnet/dotnet
    ![image](https://user-images.githubusercontent.com/7013027/269297137-4163abeb-444e-4121-958a-d2b0ec869823.png)
    3. Change the [`NullReferenceException.cs`](https://github.com/dotnet/dotnet/blob/main/src/runtime/src/libraries/System.Private.CoreLib/src/System/NullReferenceException.cs) file
    5. Build the .NET SDK (~45 minutes)
  11. premun revised this gist Sep 20, 2023. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions VMR experiments.md
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,5 @@
    Instructions for https://twitter.com/premun_/status/1626560566469791746

    ⚠️ These are from memory and haven't been tried out. Will fix them as I go. ⚠️

    ## Using Codespaces

    1. Create a Codespace at https://github.com/dotnet/dotnet
    @@ -21,6 +19,8 @@ Instructions for https://twitter.com/premun_/status/1626560566469791746

    ## Using Docker

    ⚠️ These are from memory and haven't been tried out. Will fix them as I go. ⚠️

    1. Run the container:
    `docker run --rm -itv vmr:/vmr -w /vmr mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-36`
    3. Clone the monorepo
  12. premun revised this gist Sep 20, 2023. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion VMR experiments.md
    Original file line number Diff line number Diff line change
    @@ -14,7 +14,8 @@ Instructions for https://twitter.com/premun_/status/1626560566469791746
    8. Create a new project:
    `mkdir /workspaces/foo && cd /workspaces/foo && /workspaces/.dotnet/dotnet new console`
    9. Change `Program.cs` to throw an NRE
    `code Program.cs`
    `code Program.cs`
    You can put something like `Console.WriteLine(((string?)null)!.Length);`
    11. Run it
    `/workspaces/.dotnet/dotnet run`

    @@ -31,5 +32,6 @@ Instructions for https://twitter.com/premun_/status/1626560566469791746
    8. Create a new project:
    `mkdir $HOME/foo && cd $HOME/foo && $HOME/.dotnet/dotnet new console`
    9. Change `Program.cs` to throw an NRE
    You can put something like `Console.WriteLine(((string?)null)!.Length);`
    10. Run it
    `$HOME/.dotnet/dotnet run`
  13. premun revised this gist Sep 20, 2023. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions VMR experiments.md
    Original file line number Diff line number Diff line change
    @@ -13,8 +13,9 @@ Instructions for https://twitter.com/premun_/status/1626560566469791746
    `mkdir /workspaces/.dotnet && tar -zxf artifacts/x64/Release/dotnet-sdk-* -C /workspaces/.dotnet`
    8. Create a new project:
    `mkdir /workspaces/foo && cd /workspaces/foo && /workspaces/.dotnet/dotnet new console`
    9. Change `Program.cs` to throw an NRE
    10. Run it
    9. Change `Program.cs` to throw an NRE
    `code Program.cs`
    11. Run it
    `/workspaces/.dotnet/dotnet run`

    ## Using Docker
  14. premun revised this gist Sep 20, 2023. No changes.
  15. premun revised this gist Sep 20, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion VMR experiments.md
    Original file line number Diff line number Diff line change
    @@ -12,7 +12,7 @@ Instructions for https://twitter.com/premun_/status/1626560566469791746
    6. Unpack the SDK
    `mkdir /workspaces/.dotnet && tar -zxf artifacts/x64/Release/dotnet-sdk-* -C /workspaces/.dotnet`
    8. Create a new project:
    `mkdir /workspaces/foo && cd foo && /workspaces/.dotnet/dotnet new console`
    `mkdir /workspaces/foo && cd /workspaces/foo && /workspaces/.dotnet/dotnet new console`
    9. Change `Program.cs` to throw an NRE
    10. Run it
    `/workspaces/.dotnet/dotnet run`
  16. premun revised this gist Sep 20, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion VMR experiments.md
    Original file line number Diff line number Diff line change
    @@ -15,7 +15,7 @@ Instructions for https://twitter.com/premun_/status/1626560566469791746
    `mkdir /workspaces/foo && cd foo && /workspaces/.dotnet/dotnet new console`
    9. Change `Program.cs` to throw an NRE
    10. Run it
    `/workspace/.dotnet/dotnet run`
    `/workspaces/.dotnet/dotnet run`

    ## Using Docker

  17. premun revised this gist Sep 20, 2023. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions VMR experiments.md
    Original file line number Diff line number Diff line change
    @@ -10,9 +10,9 @@ Instructions for https://twitter.com/premun_/status/1626560566469791746
    5. Build the .NET SDK (~45 minutes)
    `cd /workspaces/dotnet && ./prep.sh && ./build.sh --online`
    6. Unpack the SDK
    `mkdir /workspace/.dotnet && tar -zxf artifacts/x64/Release/dotnet-sdk-* -C /workspace/.dotnet`
    `mkdir /workspaces/.dotnet && tar -zxf artifacts/x64/Release/dotnet-sdk-* -C /workspaces/.dotnet`
    8. Create a new project:
    `mkdir /workspace/foo && cd foo && /workspace/.dotnet/dotnet new console`
    `mkdir /workspaces/foo && cd foo && /workspaces/.dotnet/dotnet new console`
    9. Change `Program.cs` to throw an NRE
    10. Run it
    `/workspace/.dotnet/dotnet run`
  18. premun revised this gist Sep 20, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion VMR experiments.md
    Original file line number Diff line number Diff line change
    @@ -28,7 +28,7 @@ Instructions for https://twitter.com/premun_/status/1626560566469791746
    5. Unpack the SDK
    `mkdir -p $HOME/.dotnet && tar -zxf artifacts/x64/Release/dotnet-sdk-* -C $HOME/.dotnet`
    8. Create a new project:
    `mkdir $HOME/foo && cd foo && $HOME/.dotnet/dotnet new console`
    `mkdir $HOME/foo && cd $HOME/foo && $HOME/.dotnet/dotnet new console`
    9. Change `Program.cs` to throw an NRE
    10. Run it
    `$HOME/.dotnet/dotnet run`
  19. premun renamed this gist Sep 20, 2023. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  20. premun revised this gist Sep 20, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Fooling with the VMR.md
    Original file line number Diff line number Diff line change
    @@ -24,7 +24,7 @@ Instructions for https://twitter.com/premun_/status/1626560566469791746
    3. Clone the monorepo
    `git clone https://github.com/dotnet/dotnet .`
    5. Build the .NET SDK
    `cd dotnet && ./prep.sh && ./build.sh --online --clean-while-building`
    `cd /vmr && ./prep.sh && ./build.sh --online --clean-while-building`
    5. Unpack the SDK
    `mkdir -p $HOME/.dotnet && tar -zxf artifacts/x64/Release/dotnet-sdk-* -C $HOME/.dotnet`
    8. Create a new project:
  21. premun renamed this gist Sep 20, 2023. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  22. premun revised this gist Sep 20, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion HOW-TO.md
    Original file line number Diff line number Diff line change
    @@ -7,7 +7,7 @@ Instructions for https://twitter.com/premun_/status/1626560566469791746
    1. Create a Codespace at https://github.com/dotnet/dotnet
    ![image](https://user-images.githubusercontent.com/7013027/269297137-4163abeb-444e-4121-958a-d2b0ec869823.png)
    3. Change the [`NullReferenceException.cs`](https://github.com/dotnet/dotnet/blob/main/src/runtime/src/libraries/System.Private.CoreLib/src/System/NullReferenceException.cs) file
    5. Build the .NET SDK
    5. Build the .NET SDK (~45 minutes)
    `cd /workspaces/dotnet && ./prep.sh && ./build.sh --online`
    6. Unpack the SDK
    `mkdir /workspace/.dotnet && tar -zxf artifacts/x64/Release/dotnet-sdk-* -C /workspace/.dotnet`
  23. premun revised this gist Sep 20, 2023. 1 changed file with 21 additions and 1 deletion.
    22 changes: 21 additions & 1 deletion HOW-TO.md
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,9 @@
    Instructions for https://twitter.com/premun_/status/1626560566469791746

    ⚠️ These are from memory and haven't been tried out. Will fix them as I go. ⚠️

    ## Using Codespaces

    1. Create a Codespace at https://github.com/dotnet/dotnet
    ![image](https://user-images.githubusercontent.com/7013027/269297137-4163abeb-444e-4121-958a-d2b0ec869823.png)
    3. Change the [`NullReferenceException.cs`](https://github.com/dotnet/dotnet/blob/main/src/runtime/src/libraries/System.Private.CoreLib/src/System/NullReferenceException.cs) file
    @@ -11,4 +15,20 @@ Instructions for https://twitter.com/premun_/status/1626560566469791746
    `mkdir /workspace/foo && cd foo && /workspace/.dotnet/dotnet new console`
    9. Change `Program.cs` to throw an NRE
    10. Run it
    `/workspace/.dotnet/dotnet run`
    `/workspace/.dotnet/dotnet run`

    ## Using Docker

    1. Run the container:
    `docker run --rm -itv vmr:/vmr -w /vmr mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-36`
    3. Clone the monorepo
    `git clone https://github.com/dotnet/dotnet .`
    5. Build the .NET SDK
    `cd dotnet && ./prep.sh && ./build.sh --online --clean-while-building`
    5. Unpack the SDK
    `mkdir -p $HOME/.dotnet && tar -zxf artifacts/x64/Release/dotnet-sdk-* -C $HOME/.dotnet`
    8. Create a new project:
    `mkdir $HOME/foo && cd foo && $HOME/.dotnet/dotnet new console`
    9. Change `Program.cs` to throw an NRE
    10. Run it
    `$HOME/.dotnet/dotnet run`
  24. premun created this gist Sep 20, 2023.
    14 changes: 14 additions & 0 deletions HOW-TO.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    Instructions for https://twitter.com/premun_/status/1626560566469791746

    1. Create a Codespace at https://github.com/dotnet/dotnet
    ![image](https://user-images.githubusercontent.com/7013027/269297137-4163abeb-444e-4121-958a-d2b0ec869823.png)
    3. Change the [`NullReferenceException.cs`](https://github.com/dotnet/dotnet/blob/main/src/runtime/src/libraries/System.Private.CoreLib/src/System/NullReferenceException.cs) file
    5. Build the .NET SDK
    `cd /workspaces/dotnet && ./prep.sh && ./build.sh --online`
    6. Unpack the SDK
    `mkdir /workspace/.dotnet && tar -zxf artifacts/x64/Release/dotnet-sdk-* -C /workspace/.dotnet`
    8. Create a new project:
    `mkdir /workspace/foo && cd foo && /workspace/.dotnet/dotnet new console`
    9. Change `Program.cs` to throw an NRE
    10. Run it
    `/workspace/.dotnet/dotnet run`