A "Best of the Best Practices" (BOBP) guide to developing in Python.
- "Build tools for others that you want to be built for you." - Kenneth Reitz
- "Simplicity is alway better than functionality." - Pieter Hintjens
| #!/usr/bin/env python | |
| # IMPORTANT! USAGE INSTRUCTIONS! | |
| # Drop this file in the top level of your project *after* you've added on_delete to all your ForeignKey and | |
| # OneToOneFields. Running it will rewrite your migration files to add whatever the current on_delete for each field is | |
| # to the past migrations. Make sure you have a clean working copy so you can easily review the differences before | |
| # committing. Assuming there were no pending migrations, running "makemigrations" should yield no new changes. | |
| import os |
| #!/bin/bash | |
| # file: ttfb.sh | |
| # curl command to check the time to first byte | |
| # ** usage ** | |
| # 1. ./ttfb.sh "https://google.com" | |
| # 2. seq 10 | xargs -Iz ./ttfb.sh "https://google.com" | |
| curl -o /dev/null \ | |
| -H 'Cache-Control: no-cache' \ | |
| -s \ |