Skip to content

Instantly share code, notes, and snippets.

View prmoore77's full-sized avatar

Philip Moore prmoore77

View GitHub Profile
@DevDuck
DevDuck / EmailTools.ts
Last active April 24, 2024 14:30
Generate EML file format from an Office Outlook email
import { Buffer } from "buffer";
var item: Office.MessageRead;
Office.onReady(() => {
item = Office.context.mailbox.item;
});
/**
* Gets the email in EML format (IMF text file). This function executes the following steps:
* (1) item.getAllInternetHeadersAsync()
@sye8
sye8 / swift3SelfSignedSSLCert.md
Last active March 26, 2024 18:45
Swift 3 Trusting a Self-Signed SSL Certificate

Swift 3 Trusting a Self-Signed SSL Certificate

For testing purposes, we may want to have local testing servers using self-signed SSL certificate for HTTPS connection. Now, suppose we have a local server with self-signed certificate, establishing an actual HTTPS connection would require us to trust our self-signed certificate. It is easy on a browser: few clicks, and you will be on your way. But how about a Swift application?

Caution: Get an actual, trusted, signed certicate for production apps!

0. A regular HTTPS request

App Transport Security (ATS) is a technology that requires an app to either support best practice HTTPS security or statically declare its security limitations via a property in its Info.plist.

@alexishida
alexishida / nginx-config-auth-cert-ssl.md
Last active November 26, 2024 15:48
Tutorial to configure Nginx client-side SSL certificates.

Client-side SSL

For excessively paranoid client authentication.

Original: https://gist.github.com/mtigas/952344

Convert SSL certificate from CRT format to PEM

openssl x509 -in server.crt -out server.der -outform DER
openssl x509 -in server.der -inform DER -out server.pem -outform PEM