Skip to content

Instantly share code, notes, and snippets.

Oleg Smedyuk conformist-mw

Block or report user

Report or block conformist-mw

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@AndrewPix
AndrewPix / serializers.py
Last active Nov 4, 2019
Integrate django-rest-knox with django-rest-auth
View serializers.py
from rest_framework import serializers
from rest_auth.serializers import UserDetailsSerializer
class KnoxSerializer(serializers.Serializer):
"""
Serializer for Knox authentication.
"""
token = serializers.CharField()
@Cediddi
Cediddi / shell_plus_for_pycharm.py
Created Mar 11, 2017
django_extensions' shell_plus for Pycharm's django console
View shell_plus_for_pycharm.py
from django_extensions.management.shells import import_objects
from django.core.management.color import no_style
globals().update(import_objects({"dont_load":[], "quiet_load":False},no_style()))
View gist:70bade805990867915cdf825c7d8879f
# Start simple SMTP server on localhost:25 and print to standard output all email headers and the email body.
# Useful for debugging outgoing mail without configuring SMTP daemon in development enviroment.
python -m smtpd -n -c DebuggingServer localhost:25
@neuroticnerd
neuroticnerd / python-on-ubuntu.sh
Last active Jul 27, 2018
Python 2.7.9 on Ubuntu 14.04.2 (without overwriting original version)
View python-on-ubuntu.sh
#! /usr/bin/env bash
# http://smirnov-am.blogspot.com/2015/04/installation-of-python-279-in-ubuntu.html
# http://davebehnke.com/python-pyenv-ubuntu.html
# https://renoirboulanger.com/blog/2015/04/upgrade-python-2-7-9-ubuntu-14-04-lts-making-deb-package/
# install dependencies
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential
@joaopizani
joaopizani / .screenrc
Created May 17, 2012
A killer GNU Screen Config
View .screenrc
# the following two lines give a two-line status, with the current window highlighted
hardstatus alwayslastline
hardstatus string '%{= kG}[%{G}%H%? %1`%?%{g}][%= %{= kw}%-w%{+b yk} %n*%t%?(%u)%? %{-}%+w %=%{g}][%{B}%m/%d %{W}%C%A%{g}]'
# huge scrollback buffer
defscrollback 5000
# no welcome message
startup_message off
You can’t perform that action at this time.