alias openssl-genkeys="openssl genrsa -out opensslgenkeys-private-key.pem 2048 \
&& openssl rsa -in opensslgenkeys-private-key.pem -out opensslgenkeys-public-key.pem -outform PEM -pubout \
&& openssl req -key opensslgenkeys-private-key.pem -new -x509 -days 3650 -out opensslgenkeys-crt.crt \
&& openssl pkcs12 -in opensslgenkeys-crt.crt -inkey opensslgenkeys-private-key.pem -export -out opensslgenkeys-pfx.pfx \
&& openssl pkcs12 -in opensslgenkeys-crt.crt -export -out opensslgenkeys-public-key.pfx -nokeys \
&& cat opensslgenkeys-pfx.pfx | base64 -w 0 > opensslgenkeys-pfx.pfx-b64 \
&& cat opensslgenkeys-public-key.pfx | base64 -w 0 > opensslgenkeys-public-key.pfx-b64 \
&& cat opensslgenkeys-private-key.pem \
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
[ | |
{ | |
"context": "Editor", | |
"bindings": { | |
"ctrl-t": "project_symbols::Toggle", | |
"ctrl-shift-t": "file_finder::Toggle", | |
"ctrl-p": "command_palette::Toggle", | |
"ctrl-g ctrl-g": "editor::GoToDefinition", | |
"ctrl-f ctrl-f": "editor::FindAllReferences", | |
"ctrl-k ctrl-c": "editor::ToggleComments", |
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
#!/bin/bash | |
set -eu | |
rm -rf ~/bin/dotnet-daily || true | |
mkdir ~/bin/dotnet-daily || true | |
wget -P ~/bin/dotnet-daily/ https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.sh | |
chmod +x ~/bin/dotnet-daily/dotnet-install.sh | |
~/bin/dotnet-daily/dotnet-install.sh -c main -v latest --install-dir ~/bin/dotnet-daily | |
#wget -P ~/bin/dotnet-daily/ https://aka.ms/dotnet/net6/dev/Sdk/dotnet-sdk-linux-x64.tar.gz |
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
c.Listen(IPEndPoint.Parse("0.0.0.0:5000", l => | |
{ | |
l.Protocols = HttpProtocols.Http2; | |
l.UseHttps(config => | |
{ | |
config.ServerCertificate = new X509Certificate2(Convert.FromBase64String("PFX-BASE64", "PASSWORD"); | |
}); | |
}); |
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
services.AddGrpcClient<DemoService.DemoServiceClient>(c => | |
{ | |
c.BaseAddress = new Uri("http://localhost:5000"); | |
}); |
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.Net.Http; | |
using System.Threading.Tasks; | |
using Grpc.Net.Client; | |
using GrpcDotNetDemoPackage; | |
namespace Client | |
{ | |
class Program | |
{ |
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.Net; | |
using System.Threading.Tasks; | |
using Google.Protobuf.WellKnownTypes; | |
using Grpc.Core; | |
using GrpcDotNetDemoPackage; | |
using Microsoft.AspNetCore.Builder; | |
using Microsoft.AspNetCore.Hosting; | |
using Microsoft.AspNetCore.Server.Kestrel.Core; | |
using Microsoft.Extensions.DependencyInjection; | |
using Microsoft.Extensions.Hosting; |
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
<Project Sdk="Microsoft.NET.Sdk.Web"> | |
<PropertyGroup> | |
<TargetFramework>netcoreapp3.0</TargetFramework> | |
</PropertyGroup> | |
<ItemGroup> | |
<PackageReference Include="Grpc.AspNetCore.Server" Version="0.1.22-pre2" /> | |
</ItemGroup> |
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
<Project Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<TargetFramework>netstandard2.0</TargetFramework> | |
</PropertyGroup> | |
<ItemGroup> | |
<PackageReference Include="Grpc.Core" Version="1.22.0" /> | |
<PackageReference Include="Grpc.Tools" Version="1.22.0-pre1" /> | |
<PackageReference Include="Google.Protobuf" Version="3.9.0-rc1" /> |
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
syntax = "proto3"; | |
import "google/protobuf/empty.proto"; | |
package GrpcDotNetDemoPackage; | |
service DemoService { | |
rpc SayHello(HelloRequest) returns (HelloResponse); | |
rpc SayHelloToNobody(google.protobuf.Empty) returns (HelloResponse); | |
} |
NewerOlder