Skip to content

Instantly share code, notes, and snippets.

View r-pankevicius's full-sized avatar

Remigijus Pankevičius r-pankevicius

  • Vilnius, Lithuania
View GitHub Profile
@r-pankevicius
r-pankevicius / TestCaseInsensitiveJsonStringEnum.cs
Created April 5, 2022 18:37
System.Text.Json.Serialization.JsonStringEnumConverter allows case insensitive enum values by default in .net 5.0
using System;
using System.Diagnostics;
using System.Text.Json;
using System.Text.Json.Serialization;
namespace TestCaseInsensitiveJsonStringEnum
{
[JsonConverter(typeof(JsonStringEnumConverter))]
public enum Season
{
C:\Temp\github-clean\machinelearning>build.cmd
GET https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.ps1
Attempting to install dotnet from public location.
dotnet-install: Note that the intended use of this script is for Continuous Integration (CI) scenarios, where:
dotnet-install: - The SDK needs to be installed without user interaction and without admin rights.
dotnet-install: - The SDK installation doesn't need to persist across multiple CI runs.
dotnet-install: To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer.
dotnet-install: Extracting the archive.
dotnet-install: Adding to current process PATH: "C:\Temp\github-clean\machinelearning\.dotnet\". Note: This change will not be visible if PowerShell was run as a child process.
C:\Temp>mkdir github-clean
C:\Temp>cd github-clean
C:\Temp\github-clean>git clone https://github.com/dotnet/machinelearning.git
Cloning into 'machinelearning'...
remote: Enumerating objects: 61066, done.
remote: Counting objects: 100% (2763/2763), done.
remote: Compressing objects: 100% (1913/1913), done.
remote: Total 61066 (delta 1103), reused 1602 (delta 780), pack-reused 58303
@r-pankevicius
r-pankevicius / micro-profiler_standalone-log.md
Created September 29, 2021 12:48
Standard output in micro-profiler_standalone.log generated by profiling playground.exe

Starting micro-profiler_standalone.exe

20210929T115245.623Z I ---------- Application logging started. 20210929T115245.623Z I MicroProfiler standalone frontend started... 20210929T115245.627Z I Frontend manager: constructed. this: 0x00C21038 20210929T115245.631Z I IPC manager: attempting server creation... endpoint_id: sockets|127.0.0.1:6100 20210929T115245.633Z I IPC manager: succeeded. 20210929T115245.634Z I IPC socket server: processing thread started.

@r-pankevicius
r-pankevicius / HttpWebRequest.cs
Created January 11, 2018 10:05
Dumps HttpWebRequest attributes
private static void DumpRequest(string description, System.Net.HttpWebRequest request)
{
var sb = new System.Text.StringBuilder();
sb.AppendLine("===").AppendFormat("REQUEST DUMP FOR {0}", description);
sb.AppendLine().AppendFormat("GetType()={0}", request.GetType());
sb.AppendLine().AppendFormat("Accept={0}", request.Accept);
sb.AppendLine().AppendFormat("Address={0}", request.Address);
sb.AppendLine().AppendFormat("AllowAutoRedirect={0}", request.AllowAutoRedirect);
sb.AppendLine().AppendFormat("AllowReadStreamBuffering={0}", request.AllowReadStreamBuffering);
C:\TEMP\build-gdal>ver
Microsoft Windows [Version 6.1.7601]
C:\TEMP\build-gdal>dir
Volume in drive C has no label.
Volume Serial Number is 5243-A922
Directory of C:\TEMP\build-gdal