Skip to content

Instantly share code, notes, and snippets.

View fabiomontefuscolo's full-sized avatar

Fabio Montefuscolo fabiomontefuscolo

View GitHub Profile
@fabiomontefuscolo
fabiomontefuscolo / gist:10c6c283915113ae64bcd01caa992a84
Created May 7, 2018 16:26 — forked from vortec/gist:5843378
Late night implementation of Tornado + Redis PubSub + Websockets. It's late, the code is messy, but it should demonstrate how the general construct works. Feel free to try it on your own after studying it.
import json
import os
import tornado.httpserver
import tornado.web
import tornado.websocket
import tornado.ioloop
import tornado.gen
import tornadoredis
@fabiomontefuscolo
fabiomontefuscolo / galera_cluster.yml
Created November 8, 2016 20:57 — forked from lucidfrontier45/galera_cluster.yml
docker-compose file for mariadb galera cluster
version: '2'
services:
node1:
image: hauptmedia/mariadb:10.1
hostname: node1
environment:
- MYSQL_ROOT_PASSWORD=test
- REPLICATION_PASSWORD=test
- MYSQL_DATABASE=maria
#!/usr/bin/env bash
# Send UPnP message
#
# @param 1 - host:port/query (optional when UPNP_URL is set)
# @param 2 - service#action (optional when UPNP_ACTION is set)
# @param 3 - message arguments in XML format (optional)
upnp_send()
{
# prefer arguments over presets