This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Manually download Windows Subsystem for Linux distro packages: | |
# @link: https://docs.microsoft.com/en-us/windows/wsl/install-manual#installing-your-distro | |
Windows Subsystem for Linux Installation Guide for Windows 10: | |
# @link: https://docs.microsoft.com/en-us/windows/wsl/install-win10#set-your-distribution-version-to-wsl-1-or-wsl-2 | |
Updating Wsl : | |
Download Msi Wsl update package from below link then install it : | |
@link : https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install docker in Debian 11/WSL2 | |
# uses systemd-genie since docker requires systemd but it's not available for WSL | |
# this is an alternative to Docker Desktop | |
# prerequisites | |
sudo apt-get update | |
sudo apt-get dist-upgrade | |
sudo apt-get install ca-certificates curl wget gnupg lsb-release apt-transport-https | |
# systemd-genie requires dotnet runtime, add Microsoft repo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class PackageBinaryInspector : MarshalByRefObject | |
{ | |
/// <summary> | |
/// Entry point to call from your code | |
/// </summary> | |
/// <typeparam name="T"></typeparam> | |
/// <param name="dllPath"></param> | |
/// <param name="errorReport"></param> | |
/// <returns></returns> | |
/// <remarks> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Runtime.CompilerServices; | |
using System.Threading.Tasks; | |
namespace StateMachineConceptual | |
{ | |
class Program | |
{ | |
static async Task Main() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Runtime.CompilerServices; | |
using System.Runtime.ExceptionServices; | |
using System.Threading; | |
namespace Fibers | |
{ | |
public struct AsyncFiberMethodBuilder<T> | |
{ | |
private Fiber<T>? fiber; |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async def main(): | |
coroutine1 = do_some_work(1) | |
coroutine2 = do_some_work(2) | |
coroutine3 = do_some_work(4) | |
tasks = [ | |
asyncio.ensure_future(coroutine1), | |
asyncio.ensure_future(coroutine2), | |
asyncio.ensure_future(coroutine3) | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from ctypes import * | |
from ctypes.wintypes import * | |
INVALID_HANDLE_VALUE = -1 | |
CREATE_UNICODE_ENVIRONMENT = 0x00000400 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using Microsoft.VisualStudio.TestTools.UnitTesting; | |
[TestClass] | |
public class StartNewCancellationTokenUnitTests | |
{ | |
[TestMethod] | |
public void CancellationTokenPassedToStartNew_CancelsTaskWithTaskCanceledException() |
NewerOlder