TODO: Write a project description
TODO: Describe the installation process
| #!/usr/bin/env bash | |
| # Created by Noi Narisak <[email protected]>. | |
| # Copyright (c) 2014. All Rights Reserved. | |
| # Licensed under the BSD License: http://creativecommons.org/licenses/BSD | |
| readonly BASEDIR=$(cd "$(dirname "$0")" && pwd) # where the script is located | |
| readonly CALLDIR=$(pwd) # where it was called from | |
| readonly STATUS_SUCCESS=0 # exit status for commands | |
| # Script configuration |
| #!/bin/bash | |
| # Add Vagrant's NFS setup commands to sudoers, for `vagrant up` without a password | |
| # Updated to work with Vagrant 1.3.x | |
| # Stage updated sudoers in a temporary file for syntax checking | |
| TMP=$(mktemp -t vagrant_sudoers) | |
| cat /etc/sudoers > $TMP | |
| cat >> $TMP <<EOF | |
| # Allow passwordless startup of Vagrant when using NFS. |
| .PHONY: install | |
| install: clean wordpress phpunit wp-cli | |
| git submodule init; | |
| @echo "\n\nNOTICE: You may need to configure a MySQL database for your Wordpress installation. Just run:" | |
| @echo " mysql -u root -p;" | |
| @echo " CREATE DATABASE example_site; \n" | |
| wordpress: latest.tar.gz | |
| tar -zxvf latest.tar.gz; |
| USER=rentzsch | |
| PASS=mypassword | |
| REPO=mogenerator | |
| # Delete default labels | |
| curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$USER/$REPO/labels/bug" | |
| curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$USER/$REPO/labels/duplicate" | |
| curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$USER/$REPO/labels/enhancement" | |
| curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$USER/$REPO/labels/invalid" | |
| curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$USER/$REPO/labels/question" |
| from datetime import datetime | |
| from sqlalchemy import Column, Integer, DateTime, ForeignKey | |
| from sqlalchemy.orm import relationship | |
| from sqlalchemy.ext.declarative import declared_attr | |
| from flask_security import current_user | |
| class AuditMixin(object): | |
| created_at = Column(DateTime, default=datetime.now) | |
| updated_at = Column(DateTime, default=datetime.now, onupdate=datetime.now) |
| from datetime import datetime | |
| from sqlalchemy import Column, Integer, DateTime, ForeignKey | |
| from sqlalchemy.orm import relationship | |
| from sqlalchemy.ext.declarative import declared_attr | |
| from flask_security import current_user | |
| class AuditMixin(object): | |
| created_at = Column(DateTime, default=datetime.now) | |
| updated_at = Column(DateTime, default=datetime.now, onupdate=datetime.now) |
| from functools import wraps | |
| from flask import request, abort, g | |
| import json | |
| import jwt | |
| import requests | |
| from typing import Union, List | |
| from ..config import cache | |
| from ..env import JWT_ISSUER, JWT_CLIENTID, JWT_AUDIENCE | |
| DISCOVERY_URL = "/.well-known/oauth-authorization-server" |