Here is easy steps to try Windows 10 on ARM or Ubuntu for ARM64 on your Apple Silicon Mac. Enjoy!
NOTE: that this is current, 10/1/2021 state.
- Install Xcode from App Store or install Command Line Tools on your Mac
| using namespace System.Management.Automation | |
| using namespace System.Management.Automation.Language | |
| if ($host.Name -eq 'ConsoleHost') | |
| { | |
| Import-Module PSReadLine | |
| } | |
| #Import-Module PSColors | |
| #Import-Module posh-git | |
| Import-Module -Name Terminal-Icons |
| using System; | |
| public class EventKeywordDemo | |
| { | |
| public event Action<int, bool> event1; | |
| public Action<int, bool> action1; | |
| public event EventHandler event2; | |
| public delegate void SampleEventType(int param1, bool param2); //Equivalent to Action<int, bool> |
| // first: `npm init -- yes && npm i chalk puppeteer-core` | |
| // then: `node . --help` | |
| const puppeteer = require('puppeteer-core'); | |
| const chalk = require('chalk'); | |
| // --- | |
| const ifHasParam = (s = '') => process.argv.includes(s); | |
| const paramValueOf = (s = '') => (process.argv.find(x => x.startsWith(`${s}=`)) || '').split('=')[1]; | |
| const DEFAULT_VIDEO_ID = '5qap5aO4i9A'; // ChillCow; his other channel is "DWcJFNfaw9c" | |
| const DEBUG = ifHasParam('--debug'); | |
| const SHOW_HEAD = ifHasParam('--head'); |
| using System; | |
| public class DelegateExamples | |
| { | |
| public void Run() | |
| { | |
| Action action1 = delegate { /*Do something*/ }; | |
| action1(); | |
| FunctionWithOnComplete(action1); |
| #!/bin/bash | |
| set -o pipefail | |
| KERNEL_WORKING_DIRECTORY="/usr/src" | |
| KERNEL_VERSION=$(uname -r) | |
| REQUIRED_DEPENDENCIES="git bison flex elfutils-libelf-devel openssl-devel" | |
| KERNEL_SRC_DIR="$KERNEL_WORKING_DIRECTORY/WSL2-Linux-Kernel-$(uname -r)" | |
| echo "Warning: This script has to be run on sudo permissions. If you encounter issues please report it immediately." |
Here is easy steps to try Windows 10 on ARM or Ubuntu for ARM64 on your Apple Silicon Mac. Enjoy!
NOTE: that this is current, 10/1/2021 state.
| using System; | |
| using Microsoft.AspNetCore.Builder; | |
| using Microsoft.AspNetCore.Hosting; | |
| using Microsoft.AspNetCore.Mvc; | |
| using Microsoft.Extensions.DependencyInjection; | |
| using Microsoft.Extensions.Hosting; | |
| using Microsoft.Extensions.Logging; | |
| using Carter; | |
| using Carter.Response; | |
| using Carter.OpenApi; |
Note
If you want to use pure WSLg, you can try the new WSLg (XWayland) tutorial or the WSLg (Wayland) tutorial.
In this tutorial, we will setup GUI in WSL2, and access it using VNC. No additional software outside WSL (like VcXsrv) is required, except, of course, a VNC Viewer (RealVNC, TightVNC, TigerVNC, UVNC, etc, all of them might work flawlessly).
The key component we need to install is the desktop metapackage you want (GNOME, KDE, Xfce, Budgie, etc) and tigervnc-standalone-server.
For this setup, I will use Ubuntu (20.04, 22.04 and 24.04 are working), and install GNOME Desktop. Since the key components aren't bound to Ubuntu or GNOME, you can use your favorite distro and GUI. Check the [Sample
Install, build and debug a react native app in WSL2 (Windows Subsystem for Linux) and Ubuntu.
| using System.Linq.Expressions; | |
| namespace Microsoft.EntityFrameworkCore | |
| { | |
| public static class IQueryableExtensions | |
| { | |
| public static IQueryable<TQuery> In<TKey, TQuery>( | |
| this IQueryable<TQuery> queryable, | |
| IEnumerable<TKey> values, | |
| Expression<Func<TQuery, TKey>> keySelector) |