Skip to content

Instantly share code, notes, and snippets.

Avatar

Jonas Schäfer horazont

View GitHub Profile
@horazont
horazont / 00-Snikket-Shell-Oneliners.md
Last active Aug 17, 2021
Handy shell commands for Snikket
View 00-Snikket-Shell-Oneliners.md

DANGER

Using any of this may void your warranty!

View rxml.rs
use rxml;
use rxml::EventRead;
const CDATA: &'static [u8] = b"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
@horazont
horazont / elasticsearch-guide.md
Last active Feb 22, 2021
Minimal elasticsearch setup for prosody logging
View elasticsearch-guide.md
  1. Disable automatic index creation in Elasticsearch

    (except those ES needs internally)

    elasticsearch.yml

    action.auto_create_index: ".watches,.triggered_watches,.watcher-history-*"
  2. Create a lifecycle policy for automatic rollover and deletion

View pubsub-purge.py
#!/usr/bin/python3
import asyncio
import getpass
import sys
import aioxmpp
async def amain(address, password, override_peer, no_verify, pubsub_service, pubsub_node):
client = aioxmpp.PresenceManagedClient(
address,
@horazont
horazont / python.xml
Created Apr 5, 2017
Kate/KDevelop/Katepart Python Highlighter with reStructuredText/Sphinx in comments
View python.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language>
<!-- Python syntax highlightning v0.9 by Per Wigren -->
<!-- Python syntax highlighting v1.9 by Michael Bueker (improved keyword differentiation) -->
<!-- Python syntax highlighting v1.97 by Paul Giannaros -->
<!-- Python syntax highlighting v1.99 by Primoz Anzur -->
<!-- Python syntax highlighting v2.01 by Paul Giannaros:
* full format character support
* unicode string modifier supported -->
<!-- v2.02 remove RegExpr for nums and make indent consistent -->