Skip to content

Instantly share code, notes, and snippets.

View ThomasHalwax's full-sized avatar

Thomas Halwax ThomasHalwax

View GitHub Profile
@ThomasHalwax
ThomasHalwax / MBTileSource.js
Last active April 13, 2020 10:32
working draft for a MBTileSource that reads tiles from a given MBTiles container at a given path
import XYZ from 'ol/source/XYZ'
import TileState from 'ol/TileState'
import Database, { Integer } from 'better-sqlite3'
const MBTileSource = options => {
/* instance of the SQLite db */
const db = new Database(options.path, { readonly: true })
const metadata = name => {
const result = db.prepare('SELECT value FROM metadata WHERE name=?').get(name)
@ThomasHalwax
ThomasHalwax / gist:a7b751b7be2263ecffa6ef39787fd16f
Created September 16, 2021 12:57
procegural.js / Milsymbol SVG image
{
"type": "FeatureCollection",
"features": [ {
"geometry": {
"type": "Point",
"coordinates": [ 13.6, 47.23, 2500 ]
},
"type": "Feature",
"id": 0,
"properties": {
@ThomasHalwax
ThomasHalwax / compose.yaml
Created January 24, 2023 12:33
a docker compose file for two matrix synapse server doing federation
services:
matrix-left-org:
image: matrixdotorg/synapse:v1.71.0
hostname: synapse.left-org.lan
networks:
- matrix-lan
ports:
- 8808:8008
volumes:
@ThomasHalwax
ThomasHalwax / homeserver-left-org.yaml
Created January 24, 2023 12:37
Synapse configuration file to be used with the docker compose file for testing federation
server_name: "matrix.left-org.lan"
pid_file: /data/homeserver.pid
listeners:
- port: 8008
tls: false
type: http
x_forwarded: true
resources:
- names: [client, federation]
compress: false
@ThomasHalwax
ThomasHalwax / home server-right-org.yaml
Created January 24, 2023 12:39
homeserver.yaml to be used with a docker-compose file in order to test federation
# Configuration file for Synapse.
#
# This is a YAML file: see [1] for a quick introduction. Note in particular
# that *indentation is important*: all the elements of a list or dictionary
# should have the same indentation.
#
# [1] https://docs.ansible.com/ansible/latest/reference_appendices/YAMLSyntax.html
#
# For more information on how to configure Synapse, including a complete accounting of
# each option, go to docs/usage/configuration/config_documentation.md or