- Download/copy the shell script
- Modify to your needs
sudo cp branch_gen.sh /usr/local/bin/branch_gen
sudo chmod +x /usr/local/bin/branch_gen
I hereby claim:
To claim this, I am signing this object:
def pytest_collection_modifyitems(items): | |
""" | |
Add marker to all tests in the conftest folder tree. | |
You need to organize your tests in folders for it to work. | |
Usage: `pytest -m $marker_expression` | |
Example: `pytest -m unit1 | |
Reference: https://docs.pytest.org/en/stable/reference.html?highlight=collection_modi#pytest.hookspec.pytest_collection_modifyitems |
# https://misc.flogisoft.com/bash/tip_colors_and_formatting | |
RED="\\e[91m" | |
GREEN="\\e[32m" | |
BLUE="\\e[94m" | |
YELLOW="\\e[33m" | |
REGULAR="\\e[39m" | |
REPORTS=".coverage-reports" | |
SRC="app" | |
VERSION=$(shell cat ${SRC}/__init__.py | head -n 1 | cut -d" " -f 3 | tr -d "'") |
app: for application, many things are considered an application. Use adjectives like web_app, phone_app, django_app | |
api: application programming interface (any communication protocol may be labelled an API, user rest_api when possible) | |
rel: relation or relative? | |
srv: server or service? |
# Get all indices, verbose | |
GET /_cat/indices?v | |
# Create an index with a mapping | |
PUT index | |
{ | |
"mappings": { | |
"_doc": { | |
"properties": { | |
"field": { |
sudo nmap --min-hostgroup 100 -F -sS -n -T4 $IP/32 | |
nc |
ALTER SEQUENCE id_seq_player RENAME TO player_id_seq; # rename a sequence artifact | |
ALTER SEQUENCE model_id_seq RESTART WITH 1; # there is also select setval(); | |
# Remove connections from a certain DB, useful for ill-finished test runs. | |
SELECT pid, pg_terminate_backend(pid) FROM pg_stat_activity WHERE datname='DB_NAME'; |
git rm --cached filename # Remove a file from repository without removing it locally | |
git reset --hard HEAD~2 # Delete last 2 commits, code included | |
git diff --name-only $commit # State the files changed in a commit |