Skip to content

Instantly share code, notes, and snippets.

View raphaelm's full-sized avatar

Raphael Michel raphaelm

View GitHub Profile
@tiefpunkt
tiefpunkt / setup.sh
Last active January 10, 2022 19:17
Run Pretix in Docker, incl. DB and Redis
# Run Pretix in Docker, with DB and Redis also as docker containers
# This exposes Pretix on port 8080 without TLS.
# Make sure to provide a reverse proxy for proper TLS termination.
# DO NOT RUN WITHOUT TLS!
# Create local directories for the DB and Pretix itself
mkdir -p /data/pretix/{db,config,data}
touch /data/pretix/config/pretix.cfg
chown -R 15371:15371 /data/pretix/{config,data}
@apollo13
apollo13 / chromelogger.py
Last active May 12, 2022 01:09
Django logging to Firefox/Chrome devtools
"""
License: MIT - https://opensource.org/licenses/MIT
ChromeLogger is a protocol which allows sending logging messages to the Browser.
This module implements simple support for Django. It consists of two components:
* `LoggingMiddleware` which is responsible for sending all log messages
associated with the request to the browser.
* `ChromeLoggerHandler` a python logging handler which collects all messages.
#!/bin/bash
# A wrapper for acme-tiny to do automatic cert rollovers.
#
# Certs/Keys/Requests are stored as
# /opt/letsencrypt/domains/*/{crt,key,csr}.pem
#
# .well-known/acme-challenge directories in document roots
# are writable for the user "letsencrypt" who runs this script
# and symlinked as
@CLAassistant
CLAassistant / SAP_CLA
Last active March 24, 2024 08:47
SAP Individual Contributor License Agreement
### SAP Individual Contributor License Agreement
Thank you for your interest in contributing to open source software projects (“Projects”) made available by SAP SE or its affiliates (“SAP”). This Individual Contributor License Agreement (“Agreement”) sets out the terms governing any source code, object code, bug fixes, configuration changes, tools, specifications, documentation, data, materials, feedback, information or other works of authorship that you submit or have submitted, in any form and in any manner, to SAP in respect of any of the Projects (collectively “Contributions”). If you have any questions respecting this Agreement, please contact opensource@sap.com.
You agree that the following terms apply to all of your past, present and future Contributions. Except for the licenses granted in this Agreement, you retain all of your right, title and interest in and to your Contributions.
**Copyright License.** You hereby grant, and agree to grant, to SAP a non-exclusive, perpetual, irrevocable, worldwi
@maskit
maskit / gist:2252422
Created March 30, 2012 15:57
WebSocket traffic sniffer
(function () {
WebSocket.prototype._send = WebSocket.prototype.send;
WebSocket.prototype.send = function (data) {
this._send(data);
this.addEventListener('message', function (msg) {
console.log('>> ' + msg.data);
}, false);
this.send = function (data) {
this._send(data);
console.log("<< " + data);