Skip to content

Instantly share code, notes, and snippets.

View fredrikhr's full-sized avatar

Fredrik Høisæther Rasch fredrikhr

  • Sandnessjøen, Norway
View GitHub Profile
@fredrikhr
fredrikhr / GoogleOrToolsDotnetCore.dockerfile
Last active June 24, 2020 22:02
GoogleOrToolsDotnetCore
# docker build -t fredrikhr/googleortools-tsp-sample-dotnetcore -f GoogleOrToolsDotnetCore.dockerfile https://gist.github.com/6cae577fcedba6311402c7e4ccefc021.git
FROM mcr.microsoft.com/dotnet/core/sdk:3.1-bionic AS build
WORKDIR /app/GoogleOrToolsDotnetCore
# Install curl
RUN set -x \
# APT Update & Upgrade
&& apt-get update \
&& apt-get upgrade --yes 2>&1 \
@fredrikhr
fredrikhr / DotnetCommandLineApiBindCommandLine.cs
Last active March 19, 2024 08:31
Using BindCommandLine for options in dotnet/command-line-api
using System;
using System.CommandLine;
using System.CommandLine.Binding;
using System.CommandLine.Builder;
using System.CommandLine.Hosting;
using System.CommandLine.Invocation;
using System.CommandLine.IO;
using System.CommandLine.Parsing;
using System.Threading;
using System.Threading.Tasks;
using System;
using System.Threading;
using System.Threading.Tasks;
using System.Net;
using System.Net.Sockets;
public class C {
public ValueTask<int> ReceiveFromAsync(
Memory<byte> buffer,
SocketFlags socketFlags,