A response to: Django: How to Log Users In With Their Email
There's an easier way than creating a custom user type. All you need to change is the AUTHENTICATION_BACKENDS
setting!
See the example account
app files in this gist!
Thanks!
""""Create "The Matrix" of binary numbers scrolling vertically in your terminal. | |
original code adapted from juancarlospaco: | |
- http://ubuntuforums.org/showpost.php?p=10306676 | |
Inspired by the movie: The Matrix | |
- Corey Goldberg (2013) | |
Requires: |
A response to: Django: How to Log Users In With Their Email
There's an easier way than creating a custom user type. All you need to change is the AUTHENTICATION_BACKENDS
setting!
See the example account
app files in this gist!
Thanks!
class Foo(models.Model): | |
def object_validation( | |
cls, some_values | |
) -> Optional[str]: | |
""" | |
Validation logic when creating a Foo record | |
If creation is via a model serializer's is_valid method this function |
# THE FZF BITS | |
[ -f ~/.fzf.bash ] && source ~/.fzf.bash | |
export RIPGREP_CONFIG_PATH=$HOME/.ripgreprc | |
# --files: List files that would be searched but do not search | |
# --no-ignore: Do not respect .gitignore, etc... | |
# --hidden: Search hidden files and folders | |
# --follow: Follow symlinks | |
# --glob: Additional conditions for search (in this case ignore everything in the .git/ folder) | |
export FZF_DEFAULT_COMMAND='rg --files --no-ignore --hidden --follow --glob "!.git/*" --glob "!**/node_modules/"' |
// Future versions of Hyper may add additional config options, | |
// which will not automatically be merged into this file. | |
// See https://hyper.is#cfg for all currently supported options. | |
module.exports = { | |
config: { | |
// choose either `'stable'` for receiving highly polished, | |
// or `'canary'` for less polished but more frequent updates | |
updateChannel: 'stable', |
xlfd_tmpl = u"-%(maker)s-%(family)s-%(weight)s-%(slant)s-%(widthtype)s-%(style)s-%(pixels)s-%(height)s-%(horiz)s-%(vert)s-%(spacing)s-%(width)s-%(registry)s-%(encoding)s" | |
def make_xlfd(maker="unknown", family=None, weight="normal", slant="r", | |
widthtype="normal", style="*", pixels=8, height="*", | |
horiz="*", vert="*", spacing="m", width="*", registry="iso8859", | |
encoding=1): | |
""" | |
Usage Example:: | |
tom@desktop ~> python xlfd_maker.py --family "Input Mono" --size 9 |