This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"rooms": { | |
"joined": { | |
"!726s6s6q:example.com": { | |
"state": { | |
"m.room.member": { | |
"@alice:example.com": { | |
"sender": "@alice:example.com", | |
"type": "m.room.member", | |
"state_key": "@alice:example.com", | |
"content": {"membership": "join"}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
allOf: | |
- $ref: 'pet.yaml' | |
type: object | |
properties: | |
laziness: | |
type: integer | |
format: int64 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import hashlib | |
import hmac | |
user = "esouvbh" | |
password = "souvik" | |
admin = False | |
key="shared_secret" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ tail -c +600000000 synapse/var/homeserver.log | grep aaron:matrix | grep send | cut -f 1,2,17-19 -d ' ' | |
2017-01-31 14:53:45,930 Processed request: 173ms | |
2017-01-31 15:01:43,250 Processed request: 146ms | |
2017-01-31 15:12:12,502 Processed request: 28ms | |
2017-01-31 15:28:53,294 Processed request: 1516ms | |
2017-01-31 15:54:48,933 Processed request: 32ms | |
2017-01-31 17:06:45,747 Processed request: 88ms | |
2017-01-31 17:24:56,666 Processed request: 737ms | |
2017-01-31 18:22:16,995 Processed request: 20ms | |
2017-01-31 18:24:33,059 Processed request: 121ms |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Example log_config file for synapse. To enable, point `log_config` to it in | |
# `homeserver.yaml`, and restart synapse. | |
# | |
# This configuration will produce similar results to the defaults within | |
# synapse, but can be edited to give more flexibility. | |
version: 1 | |
formatters: | |
fmt: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@defer.inlineCallbacks | |
def test(): | |
with LoggingContext("TEST") as x: | |
x.request = "TEST" | |
yield test_handler() | |
@defer.inlineCallbacks | |
def test_handler(): | |
deferreds = [do_stuff(x) for x in ["bob", "chris"]] | |
yield preserve_context_over_deferred(defer.gatherResults(deferreds)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use JSON qw(encode_json); | |
use Data::Dump qw(dd); | |
my $a = [1]; | |
my $before = encode_json($a); | |
dd($a); | |
my $after = encode_json($a); | |
die "$before ne $after" if $before ne $after; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
QUERY PLAN | |
------------------------------------------------------------------------------------------------------------------------------- | |
Hash Join (cost=21617.99..45328.86 rows=1 width=29) | |
Hash Cond: ((m.event_id = c.event_id) AND (m.user_id = c.state_key)) | |
-> Bitmap Heap Scan on room_memberships m (cost=236.36..23882.12 rows=3255 width=94) | |
Recheck Cond: (room_id = '!mWtzDejxeIoLEirXEV:matrix.org'::text) | |
Filter: (membership = 'join'::text) | |
-> Bitmap Index Scan on room_memberships_room_id (cost=0.00..235.54 rows=6264 width=0) | |
Index Cond: (room_id = '!mWtzDejxeIoLEirXEV:matrix.org'::text) | |
-> Hash (cost=21288.29..21288.29 rows=6223 width=85) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
matrix=# select to_timestamp(received_ts/1000),type from events where room_id='!PVNuPWbpXKukMcpzUY:t2bot.io' and stream_ordering >= 407442057; | |
to_timestamp | type | |
------------------------+---------------- | |
2018-01-18 18:51:51+00 | m.room.message | |
2018-01-18 18:51:55+00 | m.room.message | |
2018-01-18 18:52:35+00 | m.room.message | |
2018-01-18 18:52:40+00 | m.room.message | |
2018-01-18 18:53:06+00 | m.room.message | |
2018-01-18 18:54:00+00 | m.room.message |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# vim:ft=yaml | |
# Slave configuration | |
worker_app: synapse.app.media_repository | |
# The replication listener on the synapse to talk to. | |
worker_replication_url: http://127.0.0.1:9092/_synapse/replication | |
worker_replication_host: 127.0.0.1 | |
worker_replication_port: 9111 |
OlderNewer