I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.
These are the steps I went through to set up an SSL cert.
| <?php | |
| /** | |
| * Remove any non-ASCII characters and convert known non-ASCII characters | |
| * to their ASCII equivalents, if possible. | |
| * | |
| * @param string $string | |
| * @return string $string | |
| * @author Jay Williams <myd3.com> | |
| * @license MIT License | |
| * @link http://gist.github.com/119517 |
| import base64 | |
| import os | |
| from tastypie.fields import FileField | |
| from django.core.files.uploadedfile import SimpleUploadedFile | |
| class Base64FileField(FileField): | |
| """ | |
| A django-tastypie field for handling file-uploads through raw post data. | |
| It uses base64 for en-/decoding the contents of the file. | |
| Usage: |
| package main | |
| import ( | |
| "log" | |
| "net/mail" | |
| "encoding/base64" | |
| "net/smtp" | |
| "fmt" | |
| "strings" |
| /*! = $rembase: 14px | |
| -------------------------------------------------------------- | |
| * hmtl { font-size: 87.5%; } | |
| * body { font-size: 14px; font-size: 1rem; line-height: 1; } | |
| * 4px 0.28571429rem | |
| * 8px 0.571428571rem | |
| * 12px 0.857142857rem | |
| * 13px 0.928571429rem | |
| * 14px 1rem | |
| * 16px 1.142857143rem |
I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.
These are the steps I went through to set up an SSL cert.
| <!DOCTYPE html> | |
| <html ng-app> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>Lines</title> | |
| <script type="text/javascript" src="js/vendor/paper.js"></script> | |
| <script type="text/javascript" src="js/vendor/angular.min.js"></script> | |
| </head> | |
| <body ng-controller="PaperController"> | |
| #!/usr/bin/env python2 | |
| """ | |
| Author: takeshix <[email protected]> | |
| PoC code for CVE-2014-0160. Original PoC by Jared Stafford ([email protected]). | |
| Supportes all versions of TLS and has STARTTLS support for SMTP,POP3,IMAP,FTP and XMPP. | |
| """ | |
| import sys,struct,socket | |
| from argparse import ArgumentParser |
| // the main app file | |
| import express from "express"; | |
| import loadDb from "./loadDb"; // dummy middleware to load db (sets request.db) | |
| import authenticate from "./authentication"; // middleware for doing authentication | |
| import permit from "./authorization"; // middleware for checking if user's role is permitted to make request | |
| const app = express(), | |
| api = express.Router(); | |
| // first middleware will setup db connection |
| # 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 | |
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm