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:
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:
version: "3.8" | |
services: | |
db: | |
restart: always | |
image: postgres:14 | |
environment: | |
POSTGRES_HOST_AUTH_METHOD: trust | |
POSTGRES_USER: "postgres" | |
POSTGRES_PASSWORD: "postgres" | |
POSTGRES_DB: "testsuite" |
{ | |
"python.analysis.disabled": ["unnecessary-semicolon"], | |
"python.analysis.autoSearchPaths": true, | |
"python.analysis.extraPaths": [], | |
"terminal.integrated.env.osx": { | |
"PYTHONPATH": "${env:PYTHONPATH}:${workspaceFolder}/{{ cookiecutter.project_name }}", | |
}, | |
"terminal.integrated.env.linux": { | |
"PYTHONPATH": "${env:PYTHONPATH}:${workspaceFolder}/{{ cookiecutter.project_name }}", | |
}, |
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): |
""" | |
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 |
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": |
# | |
# 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 |
# Copyright (c) 2021 Tiago Silva <https://github.com/tarsil> | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: | |
# | |
# The above copyright notice and this permission notice shall be included in |
# Copyright (c) 2020 Tiago Silva <https://github.com/tarsil> | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: | |
# | |
# The above copyright notice and this permission notice shall be included in |
# Copyright (c) 2017 Tiago Silva <https://github.com/tarsil> | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: | |
# | |
# The above copyright notice and this permission notice shall be included in |