A host-only network interface is created virtually in software which appears to the host system.
This interface can be attached to one or more VMs, allowing connectivity between those VMs and communication between the host system and VMs.
A host-only network interface is created virtually in software which appears to the host system.
This interface can be attached to one or more VMs, allowing connectivity between those VMs and communication between the host system and VMs.
Logging functionality that supports:
std.fmt formatting magic| // This shows how to change Kestrel's bindings programmatically through the IConfiguraiton abstraction. | |
| // TFM: .NET 5.0 | |
| using Microsoft.AspNetCore.Hosting; | |
| using Microsoft.Extensions.Configuration; | |
| using Microsoft.Extensions.Hosting; | |
| using System; | |
| using System.Threading; | |
| namespace WebApplication85 |
| #!/usr/bin/env bash | |
| # Creates a 100Mb file send via SSH and test the transfer speed | |
| perl -e 'print "\0" x 100000000' > test.txt && du -sh test.txt | |
| # get a list of available ciphers on your machine | |
| CIPHERS="$(ssh -Q cipher)" | |
| for cipher in $CIPHERS; do | |
| echo "$cipher" |
| #!usr/bin/python3 | |
| # -*- coding: utf-8 -*- | |
| import sys | |
| from datetime import date | |
| from napalm import get_network_driver | |
| from napalm.base.exceptions import ConnectionException | |
| from paramiko.ssh_exception import SSHException | |
| from rich import print |
COR_PRF_MONITOR where:
i - COR_PRF_MONITOR_IMMUTABLE (0xEEF8CC00)a - COR_PRF_ALLOWABLE_AFTER_ATTACH (0x100502FE)n - COR_PRF_ALLOWABLE_NOTIFICATION_PROFILER (0xB1E32B7F) 0 ..n COR_PRF_MONITOR_FUNCTION_UNLOADS
1 .an COR_PRF_MONITOR_CLASS_LOADS
2 .an COR_PRF_MONITOR_MODULE_LOADS
3 .an COR_PRF_MONITOR_ASSEMBLY_LOADS
4 .an COR_PRF_MONITOR_APPDOMAIN_LOADS
| using Cysharp.Collections; // dotnet add package NativeMemoryArray | |
| namespace BufferAllocExample; | |
| public static class ExampleBufferedBytesProcessor | |
| { | |
| public static int ProcessBytes(IUtf8Processor processor, ReadOnlySpan<char> source, Span<byte> destination) | |
| { | |
| const int StackAllocLimit = 1024; // 1KB | |
| const int ArrayPoolLimit = 1024 * 1024 * 10; // 10MB |
| using System; | |
| using System.IO.MemoryMappedFiles; | |
| using MemoryMappingTools; | |
| namespace MemoryMappingTools | |
| { | |
| // We use a static modifier so the compiler will accept our ReadString extension method. | |
| unsafe static class MemoryMappedBinaryReader | |
| { | |
| /// <summary> |
| Name Hex Decimal | |
| E_UNEXPECTED 0x8000FFFF -2147418113 | |
| E_NOTIMPL 0x80004001 -2147467263 | |
| E_OUTOFMEMORY 0x8007000E -2147024882 | |
| E_INVALIDARG 0x80070057 -2147024809 | |
| E_NOINTERFACE 0x80004002 -2147467262 | |
| E_POINTER 0x80004003 -2147467261 | |
| E_HANDLE 0x80070006 -2147024890 | |
| E_ABORT 0x80004004 -2147467260 | |
| E_FAIL 0x80004005 -2147467259 |
| using System; | |
| using System.ComponentModel; | |
| using System.Runtime.InteropServices; | |
| namespace ComWithoutRegisteringExample | |
| { | |
| internal static class ComHelper | |
| { | |
| private delegate int DllGetClassObject(ref Guid clsid, ref Guid iid, [Out, MarshalAs(UnmanagedType.Interface)] out IClassFactory classFactory); |