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
// 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" |
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
#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) |
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.Security.Cryptography; | |
using System.Text; | |
namespace dps_group_sas | |
{ | |
class Program | |
{ | |
public static string ComputeDerivedSymmetricKey(byte[] masterKey, string registrationId) |
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 -SkipPublisherCheck
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
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 |
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
// 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; |
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
<%@ 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") |