Skip to content

Instantly share code, notes, and snippets.

@MrFroll
MrFroll / 2019-https-localhost.md
Created December 16, 2020 20:10 — forked from cecilemuller/2019-https-localhost.md
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

version: '2'
services:
jenkins:
image: docker:dind
container_name: docker
restart: always
privileged: true
networks:
- jenkins_net
@MrFroll
MrFroll / doublie_opt_in_processor.py
Last active April 23, 2020 18:27
Creation and validation double-opt-in url hash
# Opt-In Handler
# This code is a translation from Ruby to Python. You can find Ruby code in Mailgun Team Repository:
# https://github.com/mailgun/mailgun-ruby/blob/v1.2.2/lib/mailgun/lists/opt_in_handler.rb
import base64
import datetime
import hashlib
import hmac
import html
import json