Piedown is a small python script that converts Markdown text to HTML using only regular expressions. It was much inspired by jbroadway's Slimdown.
To convert a page.md
file written in Markdown to a page.html
file, use:
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
Piedown is a small python script that converts Markdown text to HTML using only regular expressions. It was much inspired by jbroadway's Slimdown.
To convert a page.md
file written in Markdown to a page.html
file, use:
from functools import wraps | |
from django.conf import settings | |
from django.http import HttpResponseRedirect | |
def require_ssl(view): | |
""" | |
Decorator that requires an SSL connection. If the current connection is not SSL, we redirect to the SSL version of | |
the page. |
If you need a good way to secure your Django admin site (e.g., http://example.com/admin/), this is it.
Reference: https://gist.github.com/mtigas/952344
#!/usr/bin/env python | |
from __future__ import with_statement | |
import os | |
import re | |
import shutil | |
import subprocess | |
import sys | |
import tempfile | |