Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
| #!/bin/bash | |
| # This script cleans up your EC2 instance before baking a new AMI. | |
| # Run the following command in a root shell: | |
| # | |
| # bash <(curl -s https://gist.github.com/justindowning/5921369/raw/ami-clean.sh) | |
| function print_green { | |
| echo -e "\e[32m${1}\e[0m" | |
| } |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| def archive_to_bytes(archive): | |
| def to_seconds(s): | |
| SECONDS_IN_A = { | |
| 's': 1, | |
| 'm': 1 * 60, | |
| 'h': 1 * 60 * 60, |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| #! /bin/sh | |
| usage_error () { | |
| echo 'Usage: sh migrator.sh <path to sqlite_to_postgres.py> <path to sqlite db file> <an empty dir to output dump files>' | |
| echo | |
| echo 'Example:' | |
| echo '>sh migrator.sh sqlite_to_postgres.py ~/reviewboard.db /tmp/dumps' | |
| echo | |
| echo 'Tested on:' | |
| echo 'Python 2.7.3' |