Skip to content

Instantly share code, notes, and snippets.

View Marhc's full-sized avatar
💡
Code First. Code Fast. Deliver ASAP.

Marcio Coutinho Marhc

💡
Code First. Code Fast. Deliver ASAP.
  • RJ, Brasil
View GitHub Profile
@rilleralle
rilleralle / authProvider.js
Created May 30, 2019 19:27
Example for react-admin to authenticate with OAuth2 against GitLab as the Authorization Server
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
}
@planetceres
planetceres / install_pipenv.md
Created February 3, 2019 21:31
pipenv installation notes Ubuntu 18.04

Installation Notes for pipenv on Ubuntu 18.04

1. Add ~/.local/bin to PATH

pypa/pipenv#2122 (comment)

echo 'export PATH="${HOME}/.local/bin:$PATH"' >> ~/.bashrc
@taoyuan
taoyuan / npm-using-https-for-git.sh
Last active June 25, 2024 16:25
Force git to use https:// instead of git://
# npm using https for git
git config --global url."https://github.com/".insteadOf git@github.com:
git config --global url."https://".insteadOf git://
# npm using git for https
git config --global url."git@github.com:".insteadOf https://github.com/
git config --global url."git://".insteadOf https://
@vinicius-stutz
vinicius-stutz / README.md
Last active May 8, 2024 19:19
Máscara p/ telefones com 8 ou 9 dígitos (jquery.mask.js)
@techniq
techniq / audit_mixin.py
Created March 16, 2013 01:05
Useful SQLAlchemy Mixins
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)