Skip to content

Instantly share code, notes, and snippets.

View jnnnnn's full-sized avatar

Jonathan Newnham jnnnnn

View GitHub Profile
_ _ _ ____ _ _
| | | | __ _ ___| | __ | __ ) __ _ ___| | _| |
| |_| |/ _` |/ __| |/ / | _ \ / _` |/ __| |/ / |
| _ | (_| | (__| < | |_) | (_| | (__| <|_|
|_| |_|\__,_|\___|_|\_\ |____/ \__,_|\___|_|\_(_)
A DIY Guide
# this script will generate mod.rs files that let rust-analyzer work
# without `rust-project.json` on the rustlings examples.
import os
import glob
for folder in glob.glob("exercises/*"):
if not os.path.isdir(folder):
continue
with open(os.path.join(folder, "mod.rs"), "w") as f:
@jnnnnn
jnnnnn / codeconverter-crash.log
Created April 14, 2022 03:30
VB to C# Code Converter crash log
FilenameHidden.vbproj' prior to conversion for maximum accuracy...
--------------------------------------------------------------------------------
Begin converting ProjectHidden at 10:00:48...
Phase 1 of 2:
* FilenameHidden.vb - conversion started
* FilenameHidden.vb - conversion started
@jnnnnn
jnnnnn / keybase.md
Last active October 15, 2019 03:59

Keybase proof

I hereby claim:

  • I am jnnnnn on github.
  • I am jnnnnn (https://keybase.io/jnnnnn) on keybase.
  • I have a public key whose fingerprint is 8069 F5FE C492 C318 6275 C3C5 8634 6529 2B00 824A

To claim this, I am signing this object:

private void NormalMethod()
{
Task.Run(() => TestAsync()); // runs the task on the threadpool
}
private async void TestAsync()
{
Console.WriteLine("01. Starting test async");
await T1(); // T1 will return a Task when (if) it hits its first blocker. await will then pause execution of this method until the Task completes.
Console.WriteLine("03. Continuing test async"); // We then resume execution of this method with the same context (locals, callstack, etc.) as before (but maybe on a different physical thread)
await T2();