Skip to content

Instantly share code, notes, and snippets.

View srivatsshankar's full-sized avatar

Srivats Shankar srivatsshankar

View GitHub Profile
@sandervm
sandervm / commandline.txt
Last active March 5, 2025 14:49
Generate Django secret key commandline
$ python -c 'import random; print "".join([random.choice("abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)") for i in range(50)])'
@kemitche
kemitche / simple_app.py
Last active March 20, 2025 07:52
reddit OAuth 2.0 Python Webserver Example
#!/usr/bin/env python
from flask import Flask, abort, request
from uuid import uuid4
import requests
import requests.auth
import urllib
CLIENT_ID = None # Fill this in with your client ID
CLIENT_SECRET = None # Fill this in with your client secret
REDIRECT_URI = "http://localhost:65010/reddit_callback"