From http://www.darkcoding.net/software/cleaning-up-old-git-branches/
-
Switch to the main branch, usually 'develop':
git checkout develop
-
Get a list of fully merged branches:
# | |
# CORS header support | |
# | |
# One way to use this is by placing it into a file called "cors_support" | |
# under your Nginx configuration directory and placing the following | |
# statement inside your **location** block(s): | |
# | |
# include cors_support; | |
# | |
# As of Nginx 1.7.5, add_header supports an "always" parameter which |
import requests | |
import time | |
import urllib3 | |
def check_internet(url): | |
try: | |
req = urllib3.PoolManager().request("GET", url) | |
if str(req.status) != "500": | |
if str(req.status) != "404": |
""" | |
Extend createsuperuser command to allow non-interactive creation of a | |
superuser with a password. | |
Instructions: | |
mkdir -p path-to-your-app/management/commands/ | |
touch path-to-your-app/management/__init__.py | |
touch path-to-your-app/management/commands/__init__.py |
from dramatiq.brokers.stub import StubBroker | |
class EagerBroker(StubBroker): | |
"""Used by tests to simulate CELERY_ALWAYS_EAGER behavior. | |
https://github.com/Bogdanp/dramatiq/issues/195 | |
Modified by @dnmellen to support pipelines and groups | |
""" | |
def process_message(self, message): |
From http://www.darkcoding.net/software/cleaning-up-old-git-branches/
Switch to the main branch, usually 'develop':
git checkout develop
Get a list of fully merged branches: