Add this in your ini file:
[alembic:exclude]
tables = spatial_ref_sys
In env.py:
import re
| # Copyright 2019 Luke Pinner | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software | |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| const fs = require('fs'); | |
| const readline = require('readline'); | |
| const google = require('googleapis'); | |
| const googleAuth = require('google-auth-library'); | |
| const Base64 = require('js-base64').Base64; | |
| const SCOPES = ['https://mail.google.com/', | |
| 'https://www.googleapis.com/auth/gmail.modify', | |
| 'https://www.googleapis.com/auth/gmail.compose', | |
| 'https://www.googleapis.com/auth/gmail.send' |
| /** | |
| * Class that holds a read only property. | |
| */ | |
| class PropertyBag { | |
| /** | |
| * Accessor. | |
| * | |
| * @return {string} | |
| * The value. This annotation can be used for type hinting purposes. |
| // 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 |
Add this in your ini file:
[alembic:exclude]
tables = spatial_ref_sys
In env.py:
import re
| // Listens when new request | |
| chrome.webRequest.onHeadersReceived.addListener(function(details) { | |
| for (i = 0; i < details.responseHeaders.length; i++) { | |
| if (isCSPHeader(details.responseHeaders[i].name.toUpperCase())) { | |
| var csp = details.responseHeaders[i].value; | |
| // append "https://mysite.com" to the authorized sites | |
| csp = csp.replace('script-src', 'script-src https://mysite.com'); | |
| csp = csp.replace('style-src', 'style-src https://mysite.com'); |
| # A two-line colored Bash prompt (PS1) with Git branch and a line decoration | |
| # which adjusts automatically to the width of the terminal. | |
| # Recognizes and shows Git, SVN and Fossil branch/revision. | |
| # Screenshot: http://img194.imageshack.us/img194/2154/twolineprompt.png | |
| # Michal Kottman, 2012 | |
| RESET="\[\033[0m\]" | |
| RED="\[\033[0;31m\]" | |
| GREEN="\[\033[01;32m\]" | |
| BLUE="\[\033[01;34m\]" |