Skip to content

Instantly share code, notes, and snippets.

@nagsides
nagsides / secret-key-gen.py
Created September 3, 2020 10:23 — forked from ndarville/secret-key-gen.py
Generating a properly secure SECRET_KEY in Django
"""
Two things are wrong with Django's default `SECRET_KEY` system:
1. It is not random but pseudo-random
2. It saves and displays the SECRET_KEY in `settings.py`
This snippet
1. uses `SystemRandom()` instead to generate a random key
2. saves a local `secret.txt`
@nagsides
nagsides / hello.cpp
Created August 1, 2016 15:25
GlaubenIstGut
#include<iostream>
using namespace std;