Skip to content

Instantly share code, notes, and snippets.

View mverteuil's full-sized avatar
🍇
Doing grape, thanks for asking.

M. de Verteuil mverteuil

🍇
Doing grape, thanks for asking.
View GitHub Profile
@mverteuil
mverteuil / Makefile
Created May 24, 2019 22:24 — forked from prwhite/Makefile
Add a help target to a Makefile that will allow all targets to be self documenting
# Add the following 'help' target to your Makefile
# And add help text after each target name starting with '\#\#'
help: ## Show this help.
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'
# Everything below is an example
target00: ## This message will show up when typing 'make help'
@echo does nothing
@mverteuil
mverteuil / pycharm-helpers.yml
Created October 8, 2019 16:07
Added to docker-compose step as an additional "-f", it will enable running tests from within the container in PyCharm.
version: "3.0"
services:
web:
volumes:
- pycharm_helpers_PY-191.7479.30:/opt/.pycharm_helpers
volumes:
pycharm_helpers_PY-191.7479.30: {}
@mverteuil
mverteuil / settings.py
Created January 23, 2020 18:52
Run Django Tests without HTTP(S) functionality to ensure sandboxed requests
# Block HTTP(S) in test suites
# ============================
#
# Tested with dependencies:
# - Django 1.10-2.x (may work on future versions)
# - future 0.17.1+
# - Python 2.7.x,3.7.x
# - py.test
# - nose
@mverteuil
mverteuil / gist:50e9f604592852c79f404dfaf3a62f70
Created November 26, 2020 17:28
Rebase with pre-commit checks before each commit
git rebase -x 'git reset --soft HEAD~1 && git commit -C HEAD@{1}' -i target_branch_or_commit
[tox]
isolated_build = True
envlist = py{38,39}-django{20,21,22,30,31,32},py310-django{21,22,30,31,32}
requires =
tox-poetry-installer[poetry] == 0.8.1
tox-py == 1.1.0
[tox:.package]
basepython = python3