Skip to content

Instantly share code, notes, and snippets.

@decentral1se
decentral1se / docker-compose.production.yml
Created May 1, 2020 09:59
docker-compose.production.yml
---
version: "3.7"
services:
jekyll:
command: >
jekyll serve \
--verbose \
--config /srv/jekyll/_config_prod.yml \
--trace
@decentral1se
decentral1se / bot-logs.txt
Created January 13, 2021 22:11
bot kick and re-join debug logs
DEBUG RECV: <presence to="echobot@foo.com/i8Q_SREy" type="unavailable" from="foobar@muc.foo.com/echobot" id="7ad540580b6e41eead4f6a76b78a3ed2"><x xmlns="http://jabber.org/protocol/muc#user"><status code="307" /><item role="none" jid="echobot@foo.com/i8Q_SREy" affiliation="member"><actor nick="foobar" /></item><status code="110" /></x></presence>
DEBUG MUC presence from foobar@muc.foo.com/echobot : {'lang': '', 'nick': 'echobot', 'role': 'none', 'jid': 'echobot@foo.com/i8Q_SREy', 'status_codes': {307, 110}, 'room': 'foobar@muc.foo.com', 'affiliation': 'member', 'status': '', 'show': None, 'alt_nick': ''}
DEBUG Event triggered: groupchat_presence
DEBUG Event triggered: muc::foobar@muc.foo.com::presence
DEBUG Event triggered: muc::foobar@muc.foo.com::got_offline
DEBUG RECV: <message to="echobot@foo.com" id="77f41bca-c25e-4046-ace8-4552afef3101" from="foobar@muc.foo.com"><x xmlns="http://jabber.org/protocol/muc#user"><invite from="foobar@foo.com/dino.68992a39"><reason /></invite></x><body>fooba
@decentral1se
decentral1se / docker-compose.yml
Created May 24, 2020 15:28
invoiceninja docker-compose.yml
---
version: "3.8"
services:
nginx:
image: "nginx:stable"
configs:
- source: nginx-conf-v1
target: /etc/nginx/nginx.conf
volumes:
@decentral1se
decentral1se / chmxdx_letters.py
Created May 18, 2020 14:26
chmxdx_letters.py
from contextlib import asynccontextmanager
from string import ascii_letters
from typing import Dict
import attr
from trio import (
BrokenResourceError,
ClosedResourceError,
Lock,
MemoryReceiveChannel,
@decentral1se
decentral1se / muxdemux.py
Last active May 17, 2020 18:41
Mux/demux example with trio (first steps...)
"""Mux/demux protocol toy example with Trio.
Naively done and just about working! Probably buggy. There is not much by way
of error handling however it does showcase an approach for multiplexing a
streamed connection with multiple channels. All messages that are sent over the
stream are tagged with a channel ID. Each Protocol and Channel instance have
their own incoming and outgoing queue.
I'm trying to work towards having a robust mux/demux implementation and need
some help. Any comments on this would be greatly appreciated. Hopefully this
from string import ascii_letters
from typing import Dict
import attr
from trio import ClosedResourceError, Lock, open_nursery, run
from trio.abc import Stream
from trio.testing import memory_stream_pair
@attr.s(auto_attribs=True)
@decentral1se
decentral1se / alerta.conf
Created April 10, 2020 08:55
alerta.conf (alerta-mailer troubles...)
[DEFAULT]
debug = True
endpoint = http://localhost:8080/api
key = {{ alerta_cli_api_key }}
output = json
sslverify = False
timezone = Europe/London
[alerta-mailer]
amqp_topic = notify
@decentral1se
decentral1se / datnodev4.2.log
Created March 24, 2020 21:13
datnodev4.2.log
## dat-nodev4...origin/dat-nodev4
D package-lock.json
?? datnodev4.2.log
* dat-nodev4
master
ce8e607 update package-lock.json
1adbff3 Update README.md
bebb175 update readme
6ce200c use node 12
f716675 fix tests
@decentral1se
decentral1se / datnodev4.2.log
Created March 24, 2020 21:04
datnodev4.2.log
> fd-lock@1.0.2 install /home/foo/work/dat/node_modules/fd-lock
> node-gyp-build
> sodium-native@2.4.9 install /home/foo/work/dat/node_modules/sodium-native
> node-gyp-build "node preinstall.js" "node postinstall.js"
> utp-native@1.7.3 install /home/foo/work/dat/node_modules/discovery-swarm/node_modules/utp-native
@decentral1se
decentral1se / datnodev4.log
Created March 24, 2020 20:49
datnodev4.log
> sodium-native@2.3.0 install /home/foo/work/dat/node_modules/sodium-native
> node-gyp-build "node preinstall.js" "node postinstall.js"
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'.
libtoolize: copying file 'build-aux/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'