Skip to content

Instantly share code, notes, and snippets.

View kolosovpetro's full-sized avatar

Petro Kolosov kolosovpetro

View GitHub Profile
@fntlnz
fntlnz / self-signed-certificate-with-custom-ca.md
Last active November 18, 2025 16:04
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Last update: Nov 2025.

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 ecparam -genkey -name secp384r1 | openssl ec -aes256 -out rootCA.key
@dreikanter
dreikanter / encrypt_openssl.md
Last active August 9, 2025 14:38 — forked from crazybyte/encrypt_openssl.txt
File encryption using OpenSSL

Symmetic encryption

For symmetic encryption, you can use the following:

To encrypt:

openssl aes-256-cbc -salt -a -e -in plaintext.txt -out encrypted.txt

To decrypt:

@johnallers
johnallers / gist:1674845
Created January 25, 2012 05:06
Demonstration of the C# compiler using duck typing for the foreach keyword.
namespace Samples
{
using System;
using System.Collections.Generic;
public class CustomEnumerableDemoConsole
{
public static void Main(params string[] args)
{
CustomEnumerable enumerable = new CustomEnumerable("One", "Two", "Three");