Skip to content

Instantly share code, notes, and snippets.

View GlitchedPolygons's full-sized avatar

Glitched Polygons GmbH GlitchedPolygons

View GitHub Profile
@GlitchedPolygons
GlitchedPolygons / git-auto-sign-commits.sh
Last active April 2, 2019 22:37 — forked from mort3za/git-auto-sign-commits.sh
Auto sign your git commits
# Generate a new pgp key:
gpg --full-generate-key
# maybe you need some random work in your OS to generate a key. so run this command: `find ./* /home/username -type d | xargs grep some_random_string > /dev/null`
# Check current keys:
gpg --list-secret-keys --keyid-format LONG
# Export public key in gpg:
gpg --armor --export ER34512P9
# Your key id is the HASH in front of `sec` in previous command - looks a bit like "ER34512P9" or something like that.
@GlitchedPolygons
GlitchedPolygons / RsaKeyConverter.cs
Last active August 15, 2019 08:03 — forked from misaxi/BytesExtensions.cs
Useful extension method class for converting RSA key strings back and forth from and to XML/PEM. Kudos to misaxi (https://github.com/misaxi), a huge thank you for the original gist!
using System;
using System.IO;
using System.Xml;
using System.Text;
using System.Security.Cryptography;
using Org.BouncyCastle.Pkcs;
using Org.BouncyCastle.X509;
using Org.BouncyCastle.OpenSsl;