Skip to content

Instantly share code, notes, and snippets.

View Speedy1991's full-sized avatar

Arthur Speedy1991

View GitHub Profile

What is this gist?

Explanation of a fullstack deployment of wagtail in a dockerized environment with Nginx, Elasticsearch, Postgres and Memcached

Required Skills:

  • docker
  • docker-compose
  • get a local wagtail site running
@Speedy1991
Speedy1991 / extension.py
Last active November 4, 2021 12:09
Track deprecated stawberry graphql fields with elasticsearch
from strawberry.extensions import Extension
from strawberry.types import Info
class TrackDeprecatedFieldsExtension(Extension):
def __init__(self, *args, callback: Callable[[Dict[str, int]], None], single_count=True, **kwargs):
"""
:param callback: Callback which is called with the deprecated fields dictionary
:param single_count: If true only count once per request, otherwise count once per field call
"""
@Speedy1991
Speedy1991 / Get some timing insights for graphql queries
Last active November 5, 2019 11:43
Get some timing insights for graphql queries
Setting up some timing gql information
@Speedy1991
Speedy1991 / example.py
Last active April 30, 2017 18:08
example flask-blogging with flask-login
from flask_blogging import SQLAStorage, BloggingEngine
from flask_sqlalchemy import SQLAlchemy
from flask_login import LoginManager, UserMixin, login_user, logout_user
from flask import Flask
from sqlalchemy.exc import IntegrityError
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///test.db'
app.config['SECRET_KEY'] = "12345"
db = SQLAlchemy(app)
@Speedy1991
Speedy1991 / Set up Raspberrypi3 with MPTCP
Last active January 10, 2017 20:15
Set up Raspberrypi3 with MPTCP
References:
[1] https://www.raspberrypi.org/documentation/linux/kernel/building.md
[2] https://www.raspberrypi.org/downloads/raspbian/
[3] https://www.raspberrypi.org/documentation/linux/kernel/patching.md
[4] https://wiki.ubuntuusers.de/Kernel/Kompilierung/#Konfigurations-Werkzeuge
[5] https://multipath-tcp.org/pmwiki.php/Users/DoItYourself
[6] https://github.com/multipath-tcp/iproute-mptcp.git
[7] https://multipath-tcp.org/pmwiki.php/Users/Tools
[8] http://mytechpg.blogspot.de/2016/07/mptcp-raspberrry-pi-and-yocto.html
[9] https://github.com/mytechpg/meta-mytechpg.git