Open the postgresql.conf config file:
$> mate /usr/local/var/postgres/postgresql.conf
Uncomment the line with 'log_destination' and set it to 'syslog'
log_destination = 'syslog'
Open the syslog config:
# Some good references are: | |
# http://russbrooks.com/2010/11/25/install-postgresql-9-on-os-x | |
# http://www.paolocorti.net/2008/01/30/installing-postgis-on-ubuntu/ | |
# http://postgis.refractions.net/documentation/manual-1.5/ch02.html#id2630392 | |
#1. Install PostgreSQL postgis and postgres | |
brew install postgis | |
initdb /usr/local/var/postgres | |
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start |
python -m api_docs --base-path='http://localhost:5000/api/v1/' --version=0.9 --app-module='app.app' --tables-module='models' --update-route-spec | |
python -m api_docs --base-path='http://localhost:5000/api/v1/' --version=0.9 --app-module='app.app' --tables-module='models' --update-index |
import re | |
import os | |
import argparse | |
import urlparse | |
import simplejson | |
from collections import defaultdict | |
from sqlalchemy.ext.declarative.api import DeclarativeMeta | |
SKIP_MODELS = ['BlogPost', 'BlogCategory', 'DBVersion'] |
from flask import Response | |
RE_API_DOCS_BASE_PATH = re.compile(r'"basePath": "(.*)\/api\/') | |
API_SANDBOX_URL = '"basePath": "http://localhost:5000/api/' | |
@app.route('/api/v1/api-docs', methods=['GET']) | |
def api_docs_index(): | |
return Response(RE_API_DOCS_BASE_PATH.sub(API_SANDBOX_URL, | |
open('./docs/api/v1/index.json').read()), | |
mimetype='application/json') |
# Script used to help generate Swagger docs. | |
import re | |
import os | |
import argparse | |
import urlparse | |
import simplejson | |
from collections import defaultdict | |
from sqlalchemy.ext.declarative.api import DeclarativeMeta | |
Open the postgresql.conf config file:
$> mate /usr/local/var/postgres/postgresql.conf
Uncomment the line with 'log_destination' and set it to 'syslog'
log_destination = 'syslog'
Open the syslog config:
#!/bin/bash | |
# An enhancement to the "python" executable that automatically launches you into the python debugger on error. | |
# | |
# Use it like you would the "python" executable, for example: | |
# $ trypy somefile.py | |
# or | |
# $ trypy somefile.py arg1 arg2 | |
# | |
# EXAMPLE: |
/* | |
Only allow users with a verified email address on a pre-verified domain to log in. | |
We're getting people to authenticate and only authorising those that have an email we recognise. | |
Assumes a Meteor.settings like: | |
{ adminDomains: ['tableflip.io', 'meteor.com'] } | |
...and meteor-developer accounts, but other login mechanisms (email, twitter) would work too. | |
*/ |
!#/bin/bash | |
# Install docker, docker-compose, shipyard, fix ip4 | |
yum -y update | |
mkdir /etc/systemd/system/docker.service.d | |
tee /etc/systemd/system/docker.service.d/docker.conf <<-'EOF' | |
[Service] | |
ExecStart= |
EMAIL_HOST = 'smtp.yandex.ru' | |
EMAIL_HOST_USER = '[email protected]' | |
EMAIL_HOST_PASSWORD = 'password' | |
EMAIL_PORT = 465 | |
EMAIL_USE_TLS = True |