Source: A Plug-in by Igor Escobar on Github.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# npm using https for git | |
git config --global url."https://github.com/".insteadOf [email protected]: | |
git config --global url."https://".insteadOf git:// | |
# npm using git for https | |
git config --global url."[email protected]:".insteadOf https://github.com/ | |
git config --global url."git://".insteadOf https:// |
echo 'export PATH="${HOME}/.local/bin:$PATH"' >> ~/.bashrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { AUTH_LOGIN } from 'react-admin'; | |
export default (type, params) => { | |
if (type === AUTH_LOGIN) { | |
const { username, password } = params; | |
const oAuthParams = { | |
grant_type: "password", | |
username, | |
password | |
} |