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' |
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| #!/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, |
| #!/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" | |
| } |
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
There are two parts to this:
In general, a CentOS 7 x86_64 box in AWS EC2; in specific, this Packer profile.
The purpose of this document is to make recommendations on how to browse in a privacy and security conscious manner. This information is compiled from a number of sources, which are referenced throughout the document, as well as my own experiences with the described technologies.
I welcome contributions and comments on the information contained. Please see the How to Contribute section for information on contributing your own knowledge.
Create file /etc/systemd/system/[email protected]. SystemD calling binaries using an absolute path. In my case is prefixed by /usr/local/bin, you should use paths specific for your environment.
[Unit]
Description=%i service with docker compose
PartOf=docker.service
After=docker.service| #!/bin/bash -e | |
| # see related issue: https://github.com/rundeck/rundeck/issues/357 | |
| # export required vars | |
| export RD_URL=http://localhost:4440 RD_USER=admin RD_PASSWORD=admin RD_HTTP_TIMEOUT=300 | |
| # make sure rd & jq commands are in the PATH | |
| which -- rd jq >/dev/null | |
| del_executions() { |
| File | Purpose |
|---|---|
/etc/compose/docker-compose.yml |
Compose file describing what to deploy |
/etc/systemd/system/docker-compose.service |
Service unit to start and manage docker compose |
/etc/systemd/system/docker-compose-reload.service |
Executing unit to trigger reload on docker-compose.service |
/etc/systemd/system/docker-compose-reload.timer |
Timer unit to plan the reloads |