Skip to content

Instantly share code, notes, and snippets.


MoreFreeze morefreeze

View GitHub Profile
wwek / httpsproxy.go
Created Oct 29, 2017
https proxy in golang
View httpsproxy.go
// #!/usr/bin/env bash
// case `uname -s` in
// Linux*) sslConfig=/etc/ssl/openssl.cnf;;
// Darwin*) sslConfig=/System/Library/OpenSSL/openssl.cnf;;
// esac
// openssl req \
// -newkey rsa:2048 \
// -x509 \
erikbern /
Last active May 15, 2021
How to use a .pfx file with Python requests – also works with .p12 files
import contextlib
import OpenSSL.crypto
import os
import requests
import ssl
import tempfile
def pfx_to_pem(pfx_path, pfx_password):
''' Decrypts the .pfx file to be used with requests. '''
View cpp_template.cpp
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>