From https://docs.microsoft.com/en-us/windows/terminal/tutorials/powerline-setup
https://starship.rs/guide/#%F0%9F%9A%80-installation Install a NerdFont.
winget install --id Starship.Starship
Install-Module -Name PSReadLine -Scope CurrentUser -Force
| <%@ WebHandler Language="C#" Class="Echo" %> | |
| using System; | |
| using System.Web; | |
| using System.IO; | |
| public class Echo : IHttpHandler { | |
| public void ProcessRequest (HttpContext context) { | |
| if (context.Request.HttpMethod == "POST") |
| // Licensed to the .NET Foundation under one or more agreements. | |
| // The .NET Foundation licenses this file to you under the MIT license. | |
| // See the LICENSE file in the https://github.com/dotnet/corefx project root for more information. | |
| // Usage: <ImportIntermediateCerts.exe> <certificateChain.p7b> | |
| // Importing certificates into the Intermediate Certificate store is required if the remote server | |
| // has access only to the Root CA but not to the entire chain. | |
| using System; | |
| using System.Security.Cryptography.X509Certificates; |
| Write-Output "Available COM ports: " | |
| [System.IO.Ports.SerialPort]::getportnames() | |
| $Global:portName = "COM5" | |
| Function TryBaud($rate) | |
| { | |
| $port= new-Object System.IO.Ports.SerialPort $Global:portName,$rate,None,8,one | |
| $port.open() | |
| $port.ReadTimeout = 1000 |
From https://docs.microsoft.com/en-us/windows/terminal/tutorials/powerline-setup
https://starship.rs/guide/#%F0%9F%9A%80-installation Install a NerdFont.
winget install --id Starship.Starship
Install-Module -Name PSReadLine -Scope CurrentUser -Force
| using System; | |
| using System.Security.Cryptography; | |
| using System.Text; | |
| namespace dps_group_sas | |
| { | |
| class Program | |
| { | |
| public static string ComputeDerivedSymmetricKey(byte[] masterKey, string registrationId) |
| #r "Newtonsoft.Json" | |
| using System.Net; | |
| using System.Text; | |
| using Newtonsoft.Json; | |
| //using Microsoft.Azure.Devices.Shared; | |
| //using Microsoft.Azure.Devices.Provisioning.Service; | |
| //This function will return the iot hub hostname to provision to based on which of the list of hub names has the longest host name | |
| public static async Task<HttpResponseMessage> Run(HttpRequestMessage req, TraceWriter log) |
| // Based on the dual-mode IPv4/IPv6 example in "The Linux Programming Interface", M. Kerrisk, 2010 | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <netdb.h> | |
| #include <errno.h> | |
| #include <unistd.h> | |
| #define PORT_NUM "443" |
The guide below shows how to configure a laptop to automatically boot and launch Pico 8. The laptop will shutdown when the SHUTDOWN command is issued in Pico 8 console.