Skip to content

Instantly share code, notes, and snippets.

View christianfosli's full-sized avatar

Christian Fosli christianfosli

View GitHub Profile
@christianfosli
christianfosli / README.md
Last active March 29, 2021 14:43
Print secret as Sha512 using IdentityServer4's Secret class

Encode secret using IdentityServer4

# In bash or similar
./secrets.fsx {plaintextsecret}

# Alternative for any shell
dotnet fsi secrets.fsx {plaintextsecret}
@christianfosli
christianfosli / docker-compose-https.yml
Last active October 30, 2021 15:01
aspnetcore - https with docker with linux - for _local_ development!
version: '3'
services:
app:
environment:
- ASPNETCORE_URLS=https://+:443
- ASPNETCORE_Kestrel__Certificates__Default__Path=/root/.aspnet/https/localhost.p12
# - ASPNETCORE_Kestrel__Certificates__Default__Path=/root/.aspnet/https/servicename.p12
- ASPNETCORE_Kestrel__Certificates__Default__Password=secret
volumes:
@christianfosli
christianfosli / rust_notes.md
Last active September 20, 2020 18:59
Rust Notes

Sweet Libraries

Use-case Library
Logging log & pretty-env-logger
Async tokio
Parellel processing rayon
(de)serialize json serde
Generic error anyhow::Error
version: '3.8'
services:
db:
image: postgres
environment:
- POSTGRES_PASSWORD=secret
ports:
- '5432:5432'
admin:
image: dpage/pgadmin4
@christianfosli
christianfosli / dotnet-tools.md
Last active July 27, 2020 21:53
dotnet tools

The purpose of this gist is mostly for me to keep track of insteresting dotnet tools I install.

Useful tools

Tool Description
powershell powershell core (pwsh)
dotnet-ef ef-core command line tools
dotnet-format "prettier" for dotnet (?)
microsoft.dotnet-openapi code gen based on openapi docs