Skip to content

Instantly share code, notes, and snippets.

Avatar

EmmanuelDgz

  • Andromeda
View GitHub Profile
@EmmanuelDgz
EmmanuelDgz / oh-my-zsh-bira-conda-venv.md
Created Apr 1, 2021 — forked from Samyak2/oh-my-zsh-bira-conda-venv.md
Adding virtualenv and conda support to Oh My Zsh Bira theme
View oh-my-zsh-bira-conda-venv.md

Steps to add virtualenv and conda support to Bira theme

  • Add the virtualenv plugin to ~/.zshrc and make sure these lines are in ~/.oh-my-zsh/plugins/virtualenv/virtualenv.plugin.zsh

    # disables prompt mangling in virtual_env/bin/activate
    export VIRTUAL_ENV_DISABLE_PROMPT=1
    
    #Disable conda prompt changes
    #https://conda.io/docs/user-guide/configuration/use-condarc.html#change-command-prompt-changeps1
@EmmanuelDgz
EmmanuelDgz / authentication.py
Created Oct 30, 2020 — forked from WayneSan/authentication.py
PyJWT + Django REST framework 2
View authentication.py
import jwt
from django.conf import settings
from django.contrib.auth.models import User
from rest_framework import exceptions
from rest_framework.authentication import TokenAuthentication
class JSONWebTokenAuthentication(TokenAuthentication):