Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!
openssl genrsa -des3 -out rootCA.key 4096
# Want to run your Flask tests with CSRF protections turned on, to make sure | |
# that CSRF works properly in production as well? Here's an excellent way | |
# to do it! | |
# First some imports. I'm assuming you're using Flask-WTF for CSRF protection. | |
import flask | |
from flask.testing import FlaskClient as BaseFlaskClient | |
from flask_wtf.csrf import generate_csrf | |
# Flask's assumptions about an incoming request don't quite match up with |
Picking the right architecture = Picking the right battles + Managing trade-offs
No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.
Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.
# Fix user and directory permissions: | |
find . -type f -print0 | sudo xargs -0 chmod 664 | |
find . -type d -print0 | sudo xargs -0 chmod 775 | |
# Copy user permissions to group permissions: | |
chmod -R g=u . | |
# Make new files inherit the group of the container directory | |
chmod g+s <directory> |
{% macro render_pagination(pagination, endpoint) %} | |
<ul class="pagination"> | |
{% if pagination.has_prev %} | |
<li> | |
<a href="{{ url_for(endpoint, page=pagination.prev_num) }}" aria-label="Previous"> | |
<span aria-hidden="true">«</span> | |
</a> | |
</li> |
#!/usr/bin/python3 | |
# -- Content-Encoding: UTF-8 -- | |
""" | |
Small script which is able to look for and install packages targeting another | |
platform, using pip. | |
This simplifies the creation of distribution files for different platform. | |
Only works for Python 3.4 downloads. |