This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# STORAGE CONFIGURATION | |
# ------------------------------------------------------------------------------ | |
AWS_ACCESS_KEY_ID = env("DJANGO_AWS_ACCESS_KEY_ID") | |
AWS_SECRET_ACCESS_KEY = env("DJANGO_AWS_SECRET_ACCESS_KEY") | |
AWS_STORAGE_BUCKET_NAME = env("DJANGO_AWS_STORAGE_BUCKET_NAME") | |
AWS_AUTO_CREATE_BUCKET = True | |
AWS_QUERYSTRING_AUTH = False | |
AWS_S3_REGION_NAME = "eu-central-1" | |
AWS_S3_SIGNATURE_VERSION = "s3v4" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import base64 | |
import pytest | |
from django.urls import reverse | |
from saml2 import server | |
from saml2.config import Config as PysamlConfig | |
@pytest.fixture(scope="session") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sequenceDiagram | |
participant IDP as Identity Provider | |
actor User as User (Principal) | |
participant Django as Django App (Service Provider) | |
User ->>+ Django: Access login page | |
Django -->>- User: Display login form with SSO button | |
User ->>+ Django: Click SSO login button | |
Django ->>+ IDP: Redirect to IdP for login | |
IDP -->>- User: Display login form |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import string | |
import random | |
long_key = "a_key_with_a_very_long_name_" | |
class Test: | |
def __init__(self): | |
for i in range(20): | |
v = "".join(random.choices(string.ascii_lowercase, k=20)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def blog_to_podcast(blog, content_type): | |
exclude = {"id", "page_ptr_id", "page_ptr", "translation_key"} | |
kwargs = { | |
f.name: getattr(blog, f.name) | |
for f in Blog._meta.fields | |
if f.name not in exclude | |
} | |
kwargs["slug"] = f"new_{blog.slug}" | |
kwargs["content_type"] = content_type | |
kwargs["new_itunes_artwork"] = blog.itunes_artwork |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http: | |
routers: | |
{{ fqdn }}-web-router: | |
rule: "{{ traefik_host_rule }}" | |
entryPoints: | |
- web | |
middlewares: | |
- redirect | |
service: {{ fqdn }}-web |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
┬─[jochen@ephes-m1:~/s/podlovers.org]─[13:45:31]─[G:master=] | |
╰─>$ NODE_APP_INSTANCE=testpodlovers npm run build Fr 22 Apr 13:45:31 2022 | |
> build | |
> npm run clean && gridsome build | |
> clean | |
> rm -rf static/images |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Kein schöner Ort zum Rumhängen, ist aber lecker | |
* Kirtis Dhaba | |
* Cho | |
* Beef Brothers (Burger) | |
* Takumi | |
* Su Nuraghe (Pizza) | |
# Auch zum Rumhängen geeignet | |
* Embrass | |
* Der böse Chinese |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
spam = {"ham": "eggs", "sausage": "tomato"} | |
spam = spam | {"ham": "bacon"} # since 3.9 | |
spam = {**spam, "ham": "bacon"} # since 3.5 | |
spam = dict(spam, ham="bacon") # even on python2 | |
assert spam == {'ham': 'bacon', 'sausage': 'tomato'} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
spam = {"ham": "eggs"} | |
spam | {"ham": "bacon"} # since 3.9 | |
{**spam, "ham": "bacon"} # since 3.5 | |
dict(spam, ham="bacon") # even on python2 |
NewerOlder