Skip to content

Instantly share code, notes, and snippets.

View pcan's full-sized avatar

Pierantonio Cangianiello pcan

View GitHub Profile
@pcan
pcan / gist:46da4decce64798737a458d5b3c9421c
Created January 17, 2017 21:20 — forked from mtigas/gist:952344
Mini tutorial for configuring client-side SSL certificates.

Client-side SSL

For excessively paranoid client authentication.

Using self-signed certificate.

Create a Certificate Authority root (which represents this server)

Organization & Common Name: Some human identifier for this server CA.

openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
@pcan
pcan / gai_strerror_shim.c
Created January 6, 2017 10:01
gai_strerror Shim for Luasocket static lib (compiled with MinGW)
/*
Specify the following options for the linker:
-Wl,--enable-stdcall-fixup
*/
#include "ws2tcpip.h"
char *
gai_strerrorA(
_In_ int ecode)
@pcan
pcan / typescript-types-test.ts
Last active January 5, 2017 15:46
A test of type serialization tool for TypeScript language.
class ClassTypeImpl implements reflect.ClassType {kind='class'}
class InterfaceTypeImpl implements reflect.InterfaceType {kind='interface'}
let node_modules = {
typescript : {
lib : {
lib.core.d : {
PropertyDescriptor : new InterfaceTypeImpl(),
PropertyDescriptorMap : new InterfaceTypeImpl(),
Object : new InterfaceTypeImpl(),
ObjectConstructor : new InterfaceTypeImpl(),