Skip to content

Instantly share code, notes, and snippets.

View dcube9's full-sized avatar
🎯
Focusing

Paolo Botti dcube9

🎯
Focusing
View GitHub Profile
@marcominerva
marcominerva / .editorconfig
Last active March 26, 2024 13:36
.editorconfig
# Remove the line below if you want to inherit .editorconfig settings from higher directories
root = true
[*]
#### Core EditorConfig Options ####
# Indentation and spacing
indent_size = 4
indent_style = space
@MorenoGentili
MorenoGentili / DocumentPersister.cs
Created April 19, 2020 10:26
Decompress a zip archive uploaded by the user in ASP.NET Core 3.x
using System.IO.Compression;
using Microsoft.AspNetCore.Http;
namespace DecompressDemo.Models.Services.Infrastructure
{
public class DocumentPersister
{
public void DecompressZipArchive(string directory, IFormFile formFile)
{
using Stream stream = formFile.OpenReadStream();
@cecilemuller
cecilemuller / 2019-https-localhost.md
Last active April 30, 2025 12:33
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

@fntlnz
fntlnz / self-signed-certificate-with-custom-ca.md
Last active May 3, 2025 08:56
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096