Skip to content

Instantly share code, notes, and snippets.

View Aposhian's full-sized avatar

Adam Aposhian Aposhian

View GitHub Profile
@udnaan
udnaan / openssl_cross_compile.md
Last active June 24, 2024 00:54
How to cross compile Openssl 1.1.0 for Windows Host on Ubuntu 14.04 LTS

Install mingw tools on linux:

sudo apt-get install mingw-w64

clone openssl repo:

git clone https://github.com/openssl/openssl.git

Configure openssl for cross compile:

@defrex
defrex / pretty_request.py
Last active September 8, 2023 14:33
A simple function to print a Django request the way requests are meant to be printed.
def pretty_request(request):
headers = ''
for header, value in request.META.items():
if not header.startswith('HTTP'):
continue
header = '-'.join([h.capitalize() for h in header[5:].lower().split('_')])
headers += '{}: {}\n'.format(header, value)
return (