Skip to content

Instantly share code, notes, and snippets.

View faaaaabi's full-sized avatar

Fabian Meyer faaaaabi

  • Düsseldorf, Germany
View GitHub Profile
@faaaaabi
faaaaabi / synapse-postgres-docker-compose.md
Last active October 10, 2024 16:48
A basic setup for synapse with postgres behind a nginx reverse proxy

Synapse Docker Compose Setup

This proposed setup assumes that you want to use synapse with a Postgres database behind a separate nginx reverse proxy for TLS.

Setup

DNS setup

A detailed explanation of a basic and extended dns setup can be found here

Generate synapse config

@faaaaabi
faaaaabi / ledPulse.py
Created October 29, 2018 09:08
Function for MicroPython on ESP32 which generates PWM signal on given pin. Based on: http://docs.micropython.org/en/latest/esp8266/quickref.html#pwm-pulse-width-modulation
def do_led_pulse(nPulses, pin):
import machine
import time, math
led = machine.PWM(machine.Pin(pin), freq=1000)
for j in range(pulses):
for i in range(20):
led.duty(int(math.sin(i / 10 * math.pi) * 500 + 500))
time.sleep_ms(50)
@faaaaabi
faaaaabi / odoo-docker-compose.yml
Last active October 28, 2018 21:12
docker-compose file for odoo with persitent storage. Based on https://hub.docker.com/_/odoo/
version: '2'
services:
web:
image: odoo:12.0
depends_on:
- db
ports:
- "8069:8069"
volumes:
- odoo-web-data:/var/lib/odoo
@faaaaabi
faaaaabi / .golang-example-gitlab-ci.yml
Created May 18, 2017 15:23 — forked from mikeatlas/.golang-example-gitlab-ci.yml
Example Go GitLab CI setup (no root/sudo required)
# See docs/examples
# http://doc.gitlab.com/ce/ci/quick_start/README.html
# http://doc.gitlab.com/ce/ci/yaml/README.html
# GitLab CI template for Go tests. Note this installs
# a new working copy of Go in a non-standard path such
# that sudo/root is not needed for the install stage.
# note that this particular install-environment stage
# is overly verbose in order to debug anything tricky